]> Sergey Matveev's repositories - meta4ra.git/blobdiff - cmd/meta4ra/hash.go
Unify redirection operator usage
[meta4ra.git] / cmd / meta4ra / hash.go
index 266aa61a59724db4797673acb45dc311b5069ef3..9b34141296e4db36e0a0cbfdc2d0bfe8f1b06a57 100644 (file)
@@ -32,7 +32,7 @@ func runHash() {
                "hash-name:commandline[,...]")
        flag.Usage = func() {
                fmt.Fprintf(flag.CommandLine.Output(),
-                       "Usage: %s [-hashes ...] < data | read hash name\n", os.Args[0])
+                       "Usage: %s [-hashes ...] <data | read hash name\n", os.Args[0])
                flag.PrintDefaults()
                fmt.Fprint(flag.CommandLine.Output(), `
 Only the first hash from -hashes will be used.
@@ -40,6 +40,15 @@ Only the first hash from -hashes will be used.
        }
        flag.Parse()
 
+       if *showVersion {
+               fmt.Println(meta4ra.Version())
+               return
+       }
+       if *showWarranty {
+               fmt.Println(meta4ra.Warranty)
+               return
+       }
+
        hsh := *hashes
        if i := strings.Index(hsh, ","); i != -1 {
                hsh = hsh[:i]