codes: update docstring to indicate expected usage (#6701)

This commit is contained in:
Doug Fawley 2023-10-10 13:06:23 -07:00 committed by GitHub
parent f2180b4d54
commit cb3ae760e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,13 @@ import (
"strconv"
)
// A Code is an unsigned 32-bit error code as defined in the gRPC spec.
// A Code is a status code defined according to the [gRPC documentation].
//
// Only the codes defined as consts in this package are valid codes. Do not use
// other code values. Behavior of other codes is implementation-specific and
// interoperability between implementations is not guaranteed.
//
// [gRPC documentation]: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
type Code uint32
const (