Skip to content

Commit

Permalink
address linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
davecheney committed Oct 31, 2023
1 parent e8ab7b9 commit 432dda5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"testing"
)
Expand Down Expand Up @@ -69,7 +68,7 @@ func BenchmarkBufferSize(b *testing.B) {
b.Run(tc.path, func(b *testing.B) {
for _, sz := range sizes {
buf := make([]byte, sz)
b.Run(fmt.Sprint(sz), func(b *testing.B) {
b.Run(strconv.Itoa(sz), func(b *testing.B) {
b.ReportAllocs()
b.SetBytes(r.Size())
b.ResetTimer()
Expand Down Expand Up @@ -257,7 +256,7 @@ func fixture(tb testing.TB, path string) *bytes.Reader {
defer f.Close()
gz, err := gzip.NewReader(f)
check(tb, err)
buf, err := ioutil.ReadAll(gz)
buf, err := io.ReadAll(gz)
check(tb, err)
return bytes.NewReader(buf)
}
Expand Down
2 changes: 1 addition & 1 deletion decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *stack) len() int { return len(*s) }
// to mark the start and end of arrays and objects.
// Commas and colons are elided.
//
// Note: this API is provided for compatability with the encoding/json
// Note: this API is provided for compatibility with the encoding/json
// package and carries a significant allocation cost. See NextToken for
// a more efficient API.
func (d *Decoder) Token() (json.Token, error) {
Expand Down
2 changes: 1 addition & 1 deletion scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var whitespace = [256]bool{

// Next returns a []byte referencing the the next lexical token in the stream.
// The []byte is valid until Next is called again.
// If the stream is at its end, or an error has occured, Next returns a zero
// If the stream is at its end, or an error has occurred, Next returns a zero
// length []byte slice.
//
// A valid token begins with one of the following:
Expand Down

0 comments on commit 432dda5

Please sign in to comment.