import (
"errors"
+ "fmt"
"time"
"unsafe"
)
func (pv ProtocolVersion) String() string {
name, ok := protocolNames[pv]
if !ok {
- return "unknown protocol version"
+ return fmt.Sprintf("unknown protocol version %x", pv)
}
return name
}
return proto, nil
}
}
- return 0, errors.New("unknown protocol version")
+ return 0, fmt.Errorf("unknown protocol version %q", version)
}
// TLSConfig provides configuration options for a TLS context.