From: Sergey Matveev Date: Fri, 6 Mar 2026 07:36:21 +0000 (+0300) Subject: meta4ra-list -hashes X-Git-Tag: v1.6.0~3 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fd47d2f6430bdb3abade57034d273892cc03b344;p=meta4ra.git meta4ra-list -hashes --- diff --git a/cmd/list.go b/cmd/list.go index fdf0f54..e1e0acc 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -29,6 +29,7 @@ import ( func runList() { doSize := flag.Bool("size", false, "Print file's size") + doHashes := flag.Bool("hashes", false, "Print file's hashes") doSig := flag.Bool("sig", false, "Extract signature files") flag.Usage = func() { fmt.Fprintf(flag.CommandLine.Output(), @@ -101,6 +102,12 @@ Otherwise list all URLs of the given FILE. fmt.Println(f.Size) break } + if *doHashes { + for _, h := range f.Hashes { + fmt.Println(h.Type, h.Hash) + } + break + } for _, u := range f.URLs { fmt.Println(u.String()) }