aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-20 17:00:35 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-20 17:00:35 +0200
commitb5a6022b0bbd8e1d65adcd1f2e5d935b28b2a71a (patch)
tree68423e8f24e8e494e2a8e5edee33b74e71abd6f5 /skate/cmd
parent6ee47b9d0b267a95679bbcc19dbe8acdb25797de (diff)
downloadrefcat-b5a6022b0bbd8e1d65adcd1f2e5d935b28b2a71a.tar.gz
refcat-b5a6022b0bbd8e1d65adcd1f2e5d935b28b2a71a.zip
cdx: fix -B handling
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-cdx-lookup/main.go12
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++