polish the comments of codes.go

This commit is contained in:
iamqizhao
2015-02-05 16:16:45 -08:00
parent cf3b0dfdf4
commit 2c5ec0ee1b

View File

@ -52,7 +52,7 @@ const (
// may be converted to this error. // may be converted to this error.
Unknown Code = 2 Unknown Code = 2
// InvalidArgument indicattes client specified an invalid argument. // InvalidArgument indicates client specified an invalid argument.
// Note that this differs from FailedPrecondition. It indicates arguments // Note that this differs from FailedPrecondition. It indicates arguments
// that are problematic regardless of the state of the system // that are problematic regardless of the state of the system
// (e.g., a malformed file name). // (e.g., a malformed file name).
@ -95,9 +95,9 @@ const (
// operation is applied to a non-directory, etc. // operation is applied to a non-directory, etc.
// //
// A litmus test that may help a service implementor in deciding // A litmus test that may help a service implementor in deciding
// between FailedPrecondition, ABORTED, and Unavailable: // between FailedPrecondition, Aborted, and Unavailable:
// (a) Use Unavailable if the client can retry just the failing call. // (a) Use Unavailable if the client can retry just the failing call.
// (b) Use ABORTED if the client should retry at a higher-level // (b) Use Aborted if the client should retry at a higher-level
// (e.g., restarting a read-modify-write sequence). // (e.g., restarting a read-modify-write sequence).
// (c) Use FailedPrecondition if the client should not retry until // (c) Use FailedPrecondition if the client should not retry until
// the system state has been explicitly fixed. E.g., if an "rmdir" // the system state has been explicitly fixed. E.g., if an "rmdir"
@ -115,10 +115,10 @@ const (
// etc. // etc.
// //
// See litmus test above for deciding between FailedPrecondition, // See litmus test above for deciding between FailedPrecondition,
// ABORTED, and Unavailable. // Aborted, and Unavailable.
Aborted Code = 10 Aborted Code = 10
// OutOfRange means oOperation was attempted past the valid range. // OutOfRange means operation was attempted past the valid range.
// E.g., seeking or reading past end of file. // E.g., seeking or reading past end of file.
// //
// Unlike InvalidArgument, this error indicates a problem that may // Unlike InvalidArgument, this error indicates a problem that may