File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 fail-fast : false
5757 matrix :
5858 include :
59- - { go: "1.12 " }
60- - { go: "1.17 " }
61- - { go: "1.18 " }
59+ - { go: "1.22 " }
60+ - { go: "1.24 " }
61+ - { go: "1.26 " }
6262 - { go: "^1", coverage: true }
6363 steps :
6464 - uses : actions/checkout@v6
Original file line number Diff line number Diff line change 11//go:build gofuzz
2- // +build gofuzz
32
43package robotstxt
54
Original file line number Diff line number Diff line change 11module github.com/temoto/robotstxt
22
3- go 1.12
3+ go 1.22
44
55require github.com/stretchr/testify v1.3.0
6+
7+ require (
8+ github.com/davecgh/go-spew v1.1.0 // indirect
9+ github.com/pmezard/go-difflib v1.0.0 // indirect
10+ )
Original file line number Diff line number Diff line change 55 "fmt"
66 "go/token"
77 "os"
8+ "slices"
89 "sync"
910 "unicode/utf8"
1011)
@@ -22,7 +23,7 @@ type byteScanner struct {
2223const tokEOL = "\n "
2324
2425var WhitespaceChars = []rune {' ' , '\t' , '\v' }
25- var tokBuffers = sync.Pool {New : func () interface {} { return bytes .NewBuffer (make ([]byte , 32 )) }}
26+ var tokBuffers = sync.Pool {New : func () any { return bytes .NewBuffer (make ([]byte , 32 )) }}
2627
2728func newByteScanner (srcname string , quiet bool ) * byteScanner {
2829 return & byteScanner {
@@ -136,12 +137,7 @@ func (s *byteScanner) isEol() bool {
136137}
137138
138139func (s * byteScanner ) isSpace () bool {
139- for _ , r := range WhitespaceChars {
140- if s .ch == r {
141- return true
142- }
143- }
144- return false
140+ return slices .Contains (WhitespaceChars , s .ch )
145141}
146142
147143func (s * byteScanner ) skipSpace () {
You can’t perform that action at this time.
0 commit comments