build: use sequence Split introduced in go1.24

This commit is contained in:
Nick Craig-Wood
2025-09-14 16:16:26 +01:00
parent 4368863fcb
commit 71b9b4ad7a
20 changed files with 28 additions and 28 deletions

View File

@@ -123,7 +123,7 @@ func (p *Prop) Hashes() (hashes map[hash.Type]string) {
hashes = make(map[hash.Type]string)
for _, checksums := range p.Checksums {
checksums = strings.ToLower(checksums)
for _, checksum := range strings.Split(checksums, " ") {
for checksum := range strings.SplitSeq(checksums, " ") {
switch {
case strings.HasPrefix(checksum, "sha1:"):
hashes[hash.SHA1] = checksum[5:]