build: modernize with "go fix -stringsseq": use SplitSeq iterators
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user