From 7b03f8d7d9aedf1e839ffc592e2d1943c2f418b6 Mon Sep 17 00:00:00 2001 From: Doug Fawley Date: Fri, 6 Oct 2023 14:33:53 -0700 Subject: [PATCH] codes: update docstring to indicate expected usage --- codes/codes.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/codes/codes.go b/codes/codes.go index 11b106182db2..7c4b2239917a 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 according to the gRPC spec: +// +// https://github.com/grpc/grpc/blob/master/doc/statuscodes.md +// +// Only the codes defined as consts in this package are valid codes. Do not use +// other code values. Behavior and interopability are implementation-specific +// and not guaranteed. type Code uint32 const (