aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd/skate-reduce
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-15 00:42:28 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-15 00:42:28 +0200
commit14c9274513b6949fb32d7373c43530c6b15c8e85 (patch)
tree99fdcdb1fa5b49625e00033a1aacda3ab81689ae /skate/cmd/skate-reduce
parentc4a96a00ffb5bcdee35ee36967e4da836ca58ed1 (diff)
downloadrefcat-14c9274513b6949fb32d7373c43530c6b15c8e85.tar.gz
refcat-14c9274513b6949fb32d7373c43530c6b15c8e85.zip
add -q flag
Diffstat (limited to 'skate/cmd/skate-reduce')
-rw-r--r--skate/cmd/skate-reduce/main.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go
index 959dd87..6c69121 100644
--- a/skate/cmd/skate-reduce/main.go
+++ b/skate/cmd/skate-reduce/main.go
@@ -40,6 +40,7 @@ package main
import (
"bufio"
"flag"
+ "io/ioutil"
"log"
"os"
"runtime"
@@ -53,6 +54,7 @@ var (
numWorkers = flag.Int("w", runtime.NumCPU(), "number of workers")
batchSize = flag.Int("b", 10000, "batch size")
mode = flag.String("m", "ref", "mode, e.g. exact, verify, ref, bref, wiki")
+ quite = flag.Bool("q", false, "be quite")
// Possible inputs -- we could switch to a subcommand cli parser?
refs = flag.String("F", "", "path to refs input")
@@ -72,10 +74,11 @@ var (
func main() {
flag.Parse()
-
+ if *quite {
+ log.SetOutput(ioutil.Discard)
+ }
bw := bufio.NewWriter(os.Stdout)
defer bw.Flush()
-
switch *mode {
case "exact":
l, f, err := xio.OpenTwo(*releases, *refs)