mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-02 13:03:11 +00:00
remove unneeded default case in switch
This commit is contained in:
parent
9547d0a06f
commit
7c39c5cfde
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user