projects
/
meta4ra.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b90d61
)
Modernise the code
author
Sergey Matveev <stargrave@stargrave.org>
Wed, 12 Feb 2025 10:47:59 +0000 (13:47 +0300)
committer
Sergey Matveev <stargrave@stargrave.org>
Wed, 12 Feb 2025 10:47:59 +0000 (13:47 +0300)
internal/hasher.go
patch
|
blob
|
history
diff --git
a/internal/hasher.go
b/internal/hasher.go
index 168d63cae914514c377c7208e11b7f02ae0b8fe3..1f6b3f52ea42cfcf1202f27954ac16854aed24ad 100644
(file)
--- a/
internal/hasher.go
+++ b/
internal/hasher.go
@@
-32,7
+32,7
@@
type Hasher struct {
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
@@
func (h *Hasher) Write(p []byte) (n int, rerr error) {
errs <- err
}(in)
}
- for
i := 0; i < len(h.Names); i++
{
+ for
range len(h.Names)
{
if err := <-errs; err != nil {
rerr = err
}