]> Sergey Matveev's repositories - meta4ra.git/commitdiff
Fix workability with empty -hashes v1.3.0
authorSergey Matveev <stargrave@stargrave.org>
Wed, 18 Feb 2026 14:52:59 +0000 (17:52 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 18 Feb 2026 14:57:18 +0000 (17:57 +0300)
internal/hasher.go

index 8de588fec17f592f0046a19d6bb711dd2220ca89..db2b912f628b97ffd7937fa278b1b15c409372be 100644 (file)
@@ -33,6 +33,9 @@ type Hasher struct {
 func NewHasher(hashes string) (*Hasher, error) {
        h := Hasher{}
        for hc := range strings.SplitSeq(hashes, ",") {
+               if hc == "" {
+                       continue
+               }
                cols := strings.SplitN(hc, ":", 2)
                name, cmdline := cols[0], cols[1]
                if cmdline == BuiltinCmd {