aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-07-08 18:43:47 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-07-08 18:43:47 +0200
commitd5fc1dacfec12430f2d05d16ab6f78494aba52ba (patch)
tree191166bea20b2b0eaef92ead7ff7b0be5abfbd45 /skate/cmd
parent3525a69869cbf2c4ce75a9a2054a0b33bd914dda (diff)
downloadrefcat-d5fc1dacfec12430f2d05d16ab6f78494aba52ba.tar.gz
refcat-d5fc1dacfec12430f2d05d16ab6f78494aba52ba.zip
reduce: prepare command line help
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-reduce/main.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go
index 3130a22..8b6f086 100644
--- a/skate/cmd/skate-reduce/main.go
+++ b/skate/cmd/skate-reduce/main.go
@@ -60,6 +60,7 @@ package main
import (
"bufio"
"flag"
+ "fmt"
"io/ioutil"
"log"
"os"
@@ -95,9 +96,20 @@ var (
"unknown": skate.MatchResult{Status: skate.StatusUnknown, Reason: skate.ReasonUnknown},
"isbn": skate.MatchResult{Status: skate.StatusExact, Reason: skate.ReasonISBN},
}
+
+ help = `Reduce modes
+
+TODO: table of modes and inputs, or specific link to docs
+`
)
func main() {
+ flag.Usage = func() {
+ fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0])
+ flag.PrintDefaults()
+ fmt.Println()
+ fmt.Println(help)
+ }
flag.Parse()
if *logFile != "" {
f, err := os.OpenFile(*logFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)