internal/hasher.go | 4 ++-- diff --git a/internal/hasher.go b/internal/hasher.go index 5637c9d92a3815f19c8b7db4fe653e7bb313f0befa1f85eaa947aa18ec12921c..a0dd5deb1d6b1c7d9864ce9bf75174d1927d8cc71b24bd2fca6aa1870447bb58 100644 --- a/internal/hasher.go +++ b/internal/hasher.go @@ -32,7 +32,7 @@ } func NewHasher(hashes string) (*Hasher, error) { h := Hasher{} - for _, hc := range strings.Split(hashes, ",") { + for hc := range strings.SplitSeq(hashes, ",") { cols := strings.SplitN(hc, ":", 2) name, cmdline := cols[0], cols[1] if cmdline == BuiltinCmd { @@ -95,7 +95,7 @@ _, err := io.Copy(in, bytes.NewReader(p)) errs <- err }(in) } - for i := 0; i < len(h.Names); i++ { + for range len(h.Names) { if err := <-errs; err != nil { rerr = err }