Skip to content
Merged
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 cmd/utils/app/snapshots_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ func doIntegrity(cliCtx *cli.Context) error {
checkStr := cliCtx.String("check")
var requestedChecks []integrity.Check
if len(checkStr) > 0 {
for _, split := range strings.Split(checkStr, ",") {
for split := range strings.SplitSeq(checkStr, ",") {
requestedChecks = append(requestedChecks, integrity.Check(split))
}

Expand Down
4 changes: 2 additions & 2 deletions p2p/discover/v5wire/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ func hexFile(file string) []byte {

// Gather hex data, ignore comments.
var text []byte //nolint:prealloc
for _, line := range bytes.Split(fileContent, []byte("\n")) {
for line := range bytes.SplitSeq(fileContent, []byte("\n")) {
line = bytes.TrimSpace(line)
if len(line) > 0 && line[0] == '#' {
continue
Expand Down Expand Up @@ -649,7 +649,7 @@ func writeTestVector(file, comment string, data []byte) {
defer fd.Close()

if len(comment) > 0 {
for _, line := range strings.Split(strings.TrimSpace(comment), "\n") {
for line := range strings.SplitSeq(strings.TrimSpace(comment), "\n") {
fmt.Fprintf(fd, "# %s\n", line)
}
fmt.Fprintln(fd)
Expand Down
2 changes: 1 addition & 1 deletion p2p/dnsdisc/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func parseBranch(e string) (entry, error) {
return &branchEntry{}, nil // empty entry is OK
}
hashes := make([]string, 0, strings.Count(e, ","))
for _, c := range strings.Split(e, ",") {
for c := range strings.SplitSeq(e, ",") {
if !isValidHash(c) {
return nil, entryError{"branch", errInvalidChild}
}
Expand Down
Loading