diff --git a/src/net/netip/netip.go b/src/net/netip/netip.go index eae9c29ea71..bb83371a557 100644 --- a/src/net/netip/netip.go +++ b/src/net/netip/netip.go @@ -1310,14 +1310,14 @@ func ParsePrefix(s string) (Prefix, error) { bitsStr := s[i+1:] bits, err := strconv.Atoi(bitsStr) if err != nil { - return Prefix{}, errors.New("netip.ParsePrefix(" + strconv.Quote(s) + ": bad bits after slash: " + strconv.Quote(bitsStr)) + return Prefix{}, errors.New("netip.ParsePrefix(" + strconv.Quote(s) + "): bad bits after slash: " + strconv.Quote(bitsStr)) } maxBits := 32 if ip.Is6() { maxBits = 128 } if bits < 0 || bits > maxBits { - return Prefix{}, errors.New("netip.ParsePrefix(" + strconv.Quote(s) + ": prefix length out of range") + return Prefix{}, errors.New("netip.ParsePrefix(" + strconv.Quote(s) + "): prefix length out of range") } return PrefixFrom(ip, bits), nil }