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
3d740bfe
Commit
3d740bfe
authored
6 years ago
by
Daniel Czerwonk
Browse files
Options
Downloads
Patches
Plain Diff
removed IsLegacy()
parent
a556734a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
net/ip.go
+0
-5
0 additions, 5 deletions
net/ip.go
net/ip_test.go
+3
-4
3 additions, 4 deletions
net/ip_test.go
with
3 additions
and
9 deletions
net/ip.go
+
0
−
5
View file @
3d740bfe
...
...
@@ -47,11 +47,6 @@ func (ip IP) Higher() uint64 {
return
ip
.
higher
}
// IsLegacy returns true for IPv6, else false
func
(
ip
IP
)
IsLegacy
()
bool
{
return
ip
.
isLegacy
}
// IPv4 returns a new `IP` representing an IPv4 address
func
IPv4
(
val
uint32
)
IP
{
return
IP
{
...
...
This diff is collapsed.
Click to expand it.
net/ip_test.go
+
3
−
4
View file @
3d740bfe
...
...
@@ -55,19 +55,18 @@ func TestIPVersion(t *testing.T) {
}{
{
name
:
"Test"
,
ip
:
IP
{
isLegacy
:
true
}
,
ip
:
IP
v4
(
0
)
,
expected
:
true
,
},
{
name
:
"Test"
,
ip
:
IP
{}
,
ip
:
IP
v6
(
0
,
0
)
,
expected
:
false
,
},
}
for
_
,
test
:=
range
tests
{
res
:=
test
.
ip
.
IsLegacy
()
assert
.
Equal
(
t
,
test
.
expected
,
res
,
test
.
name
)
assert
.
Equal
(
t
,
test
.
expected
,
test
.
ip
.
isLegacy
,
test
.
name
)
}
}
func
TestIPToProto
(
t
*
testing
.
T
)
{
...
...
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