Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bio-rd
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
bio-rd
Commits
5b06a6ed
Commit
5b06a6ed
authored
6 years ago
by
Daniel Czerwonk
Browse files
Options
Downloads
Patches
Plain Diff
added tests for new IP type
parent
08c9b220
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
net/ip.go
+2
-0
2 additions, 0 deletions
net/ip.go
with
2 additions
and
0 deletions
net/ip.go
+
2
−
0
View file @
5b06a6ed
...
...
@@ -6,12 +6,14 @@ type IP struct {
lower
uint64
}
// IPv4 returns a new `IP` representing an IPv4 address
func
IPv4
(
val
uint32
)
IP
{
return
IP
{
lower
:
uint64
(
val
),
}
}
// IPv6 returns a new `IP` representing an IPv6 address
func
IPv6
(
higher
,
lower
uint64
)
IP
{
return
IP
{
higher
:
higher
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment