From cb3ae760e1c2c9db174ce510f8500c71e9d49c0c Mon Sep 17 00:00:00 2001 From: Doug Fawley Date: Tue, 10 Oct 2023 13:06:23 -0700 Subject: [PATCH] codes: update docstring to indicate expected usage (#6701) --- codes/codes.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/codes/codes.go b/codes/codes.go index 11b106182db2..08476ad1fe17 100644 --- a/codes/codes.go +++ b/codes/codes.go @@ -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 (