Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Jean de Klerk 9d8d97a245
docs: add note about retrying UNAVAILABLE (#2774) 2019-04-15 14:59:43 -06:00
Fabian Holler b94ea975f3 codes: fix: marshal/unmarshal a Code to JSON fails (#2116)
Marshalling a Code to JSON and unmarshalling it failed with an
"invalid code" error message.

Code is of type uint32. It has no custom MarshalJson() implemented
therefore it is marshalled into an JSON integer value.
The UnmarshalJSON() function expected that the marshalled Code is a
String type, unmarshalling failed.

Check in UnmarshalJSON() if the value is an uint32 in the range of the
defined Code values. If it is, unmarshal it.

This commit also adds an Marshal/Unmarshal testcase.
2018-06-01 10:56:55 -07:00
田欧 8a8ac82f1f update const order (#1770) 2018-01-04 15:44:29 -08:00
dfawley 2941ee12eb
codes: Add UnmarshalJSON support to Code type (#1720) 2017-12-11 09:02:19 -08:00
Menghan Li b8191e57b2
remove stringer and go generate (#1715) 2017-12-06 17:35:20 -08:00
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
Mehrdad Afshari 5e42b6f37e Fixed comment spelling (#1254) 2017-05-22 13:13:07 -07:00
Max Hawkins 972dbd2cb2 Run stringer on codes.Code
This makes error codes easier to read:
fmt.Sprint(codes.OK) == "OK" instead of "0"
2015-03-24 10:15:18 -07:00
David Symonds 3981839a52 Add import comments to grpc packages.
This enforces that these packages are used with these import paths.
See http://golang.org/cmd/go/#hdr-Import_path_checking for documentation.
2015-02-09 13:46:16 +11:00
David Symonds e71095e0ec Move source files up one level.
The top-level directory in this repository is going to be
the main "grpc" package.
2015-02-09 11:33:38 +11:00