Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/apiutil/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func ParseAccept(header string) []mediaRange {
}

var out []mediaRange
for _, field := range strings.Split(header, ",") {
for field := range strings.SplitSeq(header, ",") {
if r, ok := parseMediaRange(field); ok {
out = append(out, r)
}
Expand Down
3 changes: 3 additions & 0 deletions changelog/asttool-use-splitseq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- replace Split in loops with more efficient SplitSeq
2 changes: 1 addition & 1 deletion cmd/beacon-chain/flags/api_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func EnableHTTPEthAPI(httpModules string) bool {
}

func enableAPI(httpModules, api string) bool {
for _, m := range strings.Split(httpModules, ",") {
for m := range strings.SplitSeq(httpModules, ",") {
if strings.EqualFold(m, api) {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion tools/nogo_config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func main() {
return
}

for _, check := range strings.Split(*checks, ",") {
for check := range strings.SplitSeq(*checks, ",") {
c.AddExclusion(strings.TrimSpace(check), e)
}

Expand Down