diff options
-rw-r--r-- | skate/cmd/skate-cdx-lookup/main.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/skate/cmd/skate-cdx-lookup/main.go b/skate/cmd/skate-cdx-lookup/main.go index 308fffb..0578098 100644 --- a/skate/cmd/skate-cdx-lookup/main.go +++ b/skate/cmd/skate-cdx-lookup/main.go @@ -72,11 +72,13 @@ func main() { log.Fatal(err) } rows, err := skate.ParseCDX(b) - if *bestEffort { - log.Println(err) - continue - } else { - log.Fatal(err) + if err != nil { + if *bestEffort { + log.Println(err) + continue + } else { + log.Fatal(err) + } } fmt.Printf("[%05d] % 10d %s %s\n", i, len(rows), rows.Summary(), line) i++ |