diff options
Diffstat (limited to 'skate/cmd')
-rw-r--r-- | skate/cmd/skate-map/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/skate/cmd/skate-map/main.go b/skate/cmd/skate-map/main.go index 4b30927..3682e7b 100644 --- a/skate/cmd/skate-map/main.go +++ b/skate/cmd/skate-map/main.go @@ -54,7 +54,7 @@ var ( extraValue = flag.String("x", "", "extra value to pass to configurable mappers") bestEffort = flag.Bool("B", false, "best effort") logFile = flag.String("log", "", "log filename") - skipOnEmpty = flag.Int("skip-on-empty", -1, "omit docs with empty value in given column (zero indexed)") + skipOnEmpty = flag.Int("skip-on-empty", 0, "omit docs with empty value in given column (one indexed)") help = `skate-map available mappers @@ -87,8 +87,8 @@ func main() { if mapf, ok := availableMappers[*mapperName]; !ok { log.Fatalf("unknown mapper name: %v", *mapperName) } else { - if *skipOnEmpty >= 0 { - mapf = skate.WithSkipOnEmpty(mapf, *skipOnEmpty) + if *skipOnEmpty > 0 { + mapf = skate.WithSkipOnEmpty(mapf, *skipOnEmpty-1) } if *keyPrefix != "" { mapf = skate.WithPrefix(mapf, *keyPrefix) |