Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
7c39c5cf
Commit
7c39c5cf
authored
Mar 30, 2021
by
Marten Seemann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unneeded default case in switch
parent
9547d0a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
net/private.go
net/private.go
+0
-4
No files found.
net/private.go
View file @
7c39c5cf
...
...
@@ -72,8 +72,6 @@ func IsPublicAddr(a ma.Multiaddr) bool {
switch
c
.
Protocol
()
.
Code
{
case
ma
.
P_IP6ZONE
:
return
true
default
:
return
false
case
ma
.
P_IP4
:
ip
:=
net
.
IP
(
c
.
RawValue
())
isPublic
=
!
inAddrRange
(
ip
,
Private4
)
&&
!
inAddrRange
(
ip
,
Unroutable4
)
...
...
@@ -93,8 +91,6 @@ func IsPrivateAddr(a ma.Multiaddr) bool {
switch
c
.
Protocol
()
.
Code
{
case
ma
.
P_IP6ZONE
:
return
true
default
:
return
false
case
ma
.
P_IP4
:
isPrivate
=
inAddrRange
(
net
.
IP
(
c
.
RawValue
()),
Private4
)
case
ma
.
P_IP6
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment