From b5a6022b0bbd8e1d65adcd1f2e5d935b28b2a71a Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 20 May 2021 17:00:35 +0200 Subject: cdx: fix -B handling --- skate/cmd/skate-cdx-lookup/main.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'skate/cmd') 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++ -- cgit v1.2.3