We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 985dae3 commit 0773afcCopy full SHA for 0773afc
netstat-nat.go
@@ -71,10 +71,10 @@ func main() {
71
72
filteredFlows := flows.FilterByType(which)
73
if *protocol != "" {
74
- protoent, err := netdb.GetProtoByName(*protocol)
75
- if err != nil {
+ protoent, ok := netdb.GetProtoByName(*protocol)
+ if !ok {
76
// TODO descriptive error message
77
- panic(err)
+ panic("Unknown protocol")
78
}
79
filteredFlows = filteredFlows.FilterByProtocol(protoent)
80
0 commit comments