Skip to content

Commit cb3ae76

Browse files
authored
codes: update docstring to indicate expected usage (#6701)
1 parent f2180b4 commit cb3ae76

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

codes/codes.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ import (
2525
"strconv"
2626
)
2727

28-
// A Code is an unsigned 32-bit error code as defined in the gRPC spec.
28+
// A Code is a status code defined according to the [gRPC documentation].
29+
//
30+
// Only the codes defined as consts in this package are valid codes. Do not use
31+
// other code values. Behavior of other codes is implementation-specific and
32+
// interoperability between implementations is not guaranteed.
33+
//
34+
// [gRPC documentation]: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
2935
type Code uint32
3036

3137
const (

0 commit comments

Comments
 (0)