From fd47d2f6430bdb3abade57034d273892cc03b344 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 6 Mar 2026 10:36:21 +0300 Subject: [PATCH] meta4ra-list -hashes --- cmd/list.go | 7 +++++++ 1 file changed, 7 insertions(+) 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()) } -- 2.52.0