Do not lint the protocol magic numbers

I happily use https://pkg.go.dev/golang.org/x/net/internal/iana, but it is internal
This commit is contained in:
Juan Font Alonso 2022-06-08 17:55:32 +02:00
parent ab1aac9f3e
commit 8287ba24b9

View File

@ -23,7 +23,7 @@ const (
errInvalidGroup = Error("invalid group")
errInvalidTag = Error("invalid tag")
errInvalidPortFormat = Error("invalid port format")
errWildcardIsNeeded = Error("wildcard as port is required for the procotol")
errWildcardIsNeeded = Error("wildcard as port is required for the protocol")
)
const (
@ -267,7 +267,7 @@ func parseProtocol(protocol string) ([]int, bool, error) {
if err != nil {
return nil, false, err
}
needsWildcard := protocolNumber != 6 && protocolNumber != 17 && protocolNumber != 132
needsWildcard := protocolNumber != 6 && protocolNumber != 17 && protocolNumber != 132 // nolint
return []int{protocolNumber}, needsWildcard, nil
}