mirror of
https://github.com/golang/go.git
synced 2026-06-28 03:40:37 +00:00
src: spelling and grammar fixes
Change-Id: If08338a742faf4124b14ca16e0a9ab0faa283faa
GitHub-Last-Rev: 75e33b2146
GitHub-Pull-Request: golang/go#79248
Reviewed-on: https://go-review.googlesource.com/c/go/+/775080
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
8908cc14cc
commit
fee42ee058
5 changed files with 8 additions and 8 deletions
|
|
@ -637,7 +637,7 @@ type Config struct {
|
|||
// SetSessionTicketKeys is called on the returned Config, those keys will
|
||||
// be used. Otherwise, the original Config keys will be used (and possibly
|
||||
// rotated if they are automatically managed). WARNING: this allows session
|
||||
// resumtion of connections originally established with the parent (or a
|
||||
// resumption of connections originally established with the parent (or a
|
||||
// sibling) Config, which may bypass the [Config.VerifyPeerCertificate]
|
||||
// value of the returned Config.
|
||||
GetConfigForClient func(*ClientHelloInfo) (*Config, error)
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,7 @@ func (d *Decoder) UnreadBuffer() []byte {
|
|||
|
||||
// StackDepth returns the depth of the state machine for read JSON data.
|
||||
// Each level on the stack represents a nested JSON object or array.
|
||||
// It is incremented whenever an [BeginObject] or [BeginArray] token is encountered
|
||||
// It is incremented whenever a [BeginObject] or [BeginArray] token is encountered
|
||||
// and decremented whenever an [EndObject] or [EndArray] token is encountered.
|
||||
// The depth is zero-indexed, where zero represents the top-level JSON value.
|
||||
func (d *Decoder) StackDepth() int {
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ func (e *Encoder) AvailableBuffer() []byte {
|
|||
|
||||
// StackDepth returns the depth of the state machine for written JSON data.
|
||||
// Each level on the stack represents a nested JSON object or array.
|
||||
// It is incremented whenever an [BeginObject] or [BeginArray] token is encountered
|
||||
// It is incremented whenever a [BeginObject] or [BeginArray] token is encountered
|
||||
// and decremented whenever an [EndObject] or [EndArray] token is encountered.
|
||||
// The depth is zero-indexed, where zero represents the top-level JSON value.
|
||||
func (e *Encoder) StackDepth() int {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ func (s *state) reset() {
|
|||
// either a JSON object name or an index to a JSON array element
|
||||
// encoded as a base-10 integer value.
|
||||
// It is impossible to distinguish between an array index and an object name
|
||||
// (that happens to be an base-10 encoded integer) without also knowing
|
||||
// (that happens to be a base-10 encoded integer) without also knowing
|
||||
// the structure of the top-level JSON value that the pointer refers to.
|
||||
//
|
||||
// There is exactly one representation of a pointer to a particular value,
|
||||
|
|
@ -475,7 +475,7 @@ func (e stateEntry) NeedObjectName() bool {
|
|||
return e&(stateTypeMask|stateCountLSBMask) == stateTypeObject|stateCountEven
|
||||
}
|
||||
|
||||
// needImplicitColon reports whether an colon should occur next,
|
||||
// needImplicitColon reports whether a colon should occur next,
|
||||
// which always occurs after JSON object names.
|
||||
func (e stateEntry) needImplicitColon() bool {
|
||||
return e.needObjectValue()
|
||||
|
|
@ -487,7 +487,7 @@ func (e stateEntry) needObjectValue() bool {
|
|||
return e&(stateTypeMask|stateCountLSBMask) == stateTypeObject|stateCountOdd
|
||||
}
|
||||
|
||||
// needImplicitComma reports whether an comma should occur next,
|
||||
// needImplicitComma reports whether a comma should occur next,
|
||||
// which always occurs after a value in a JSON object or array
|
||||
// before the next value (or name).
|
||||
func (e stateEntry) needImplicitComma(next Kind) bool {
|
||||
|
|
|
|||
|
|
@ -525,10 +525,10 @@ func f64toi64(f64 float64) int64 {
|
|||
// It reports an error that matches [strconv.ErrSyntax] if the JSON number
|
||||
// does not match the restricted grammar of just an unsigned integer.
|
||||
// It reports an error that matches [strconv.ErrRange] if the JSON number
|
||||
// is an unsigned integer, but outside the representable range of an uint64.
|
||||
// is an unsigned integer, but outside the representable range of a uint64.
|
||||
// Even if an error is reported, a reasonable value is still returned.
|
||||
// The fractional component of any number is ignored (truncation toward zero).
|
||||
// Any number beyond the representation of an uint64 will be saturated
|
||||
// Any number beyond the representation of a uint64 will be saturated
|
||||
// to the closest representable value.
|
||||
//
|
||||
// It panics if the token kind is not a JSON number.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue