Skip to content

Commit

Permalink
Fixes Bool method comment (#115)
Browse files Browse the repository at this point in the history
* Fixes Bool method comment

* Update json/token.go

Co-authored-by: Achille <achille.roussel@gmail.com>
  • Loading branch information
Succo and achille-roussel authored Dec 11, 2021
1 parent 3147938 commit 4e2cc2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions json/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,13 @@ func (t *Tokenizer) pop(expect scope) error {
// on.
func (t *Tokenizer) Kind() Kind { return t.flags.kind() }

// String returns a byte slice containing the value of the json string that the
// Bool returns a bool containing the value of the json boolean that the
// tokenizer is currently pointing at.
//
// This method must only be called after checking the kind of the token via a
// call to Kind.
//
// If the tokenizer is not positioned on a string, the behavior is undefined.
// If the tokenizer is not positioned on a boolean, the behavior is undefined.
func (t *Tokenizer) Bool() bool { return t.flags.kind() == True }

// Int returns a byte slice containing the value of the json number that the
Expand Down

0 comments on commit 4e2cc2a

Please # to comment.