build: modernize with "go fix -stringsseq": use SplitSeq iterators

This commit is contained in:
Nick Craig-Wood
2026-08-21 12:23:31 +01:00
parent aed06f9052
commit 2d1a3386a8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ func (s *Server) handlePost(w http.ResponseWriter, r *http.Request, path string)
// Check for Prefer: respond-async header (RFC 7240)
preferAsync := false
for _, pref := range strings.Split(r.Header.Get("Prefer"), ",") {
for pref := range strings.SplitSeq(r.Header.Get("Prefer"), ",") {
if strings.EqualFold(strings.TrimSpace(pref), "respond-async") {
preferAsync = true
in["_async"] = true
+1 -1
View File
@@ -3114,7 +3114,7 @@ func testLoggerVsLsf(ctx context.Context, fdst, fsrc fs.Fs, logger *bytes.Buffer
// not be compared against the hash the logger predicted.
func blankMissingHashes(logger, lsf *bytes.Buffer) {
noHash := map[string]bool{}
for _, line := range bytes.Split(lsf.Bytes(), []byte("\n")) {
for line := range bytes.SplitSeq(lsf.Bytes(), []byte("\n")) {
elements := bytes.SplitN(line, []byte(";"), 4)
if len(elements) == 4 && len(elements[1]) == 0 {
noHash[string(elements[3])] = true