From 8714537ecffa0641516bc01b8cdc4cdd9a9d975c Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 20 May 2021 14:31:04 +0200 Subject: wip: cdx lookup --- skate/cmd/skate-cdx-lookup/main.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'skate/cmd') diff --git a/skate/cmd/skate-cdx-lookup/main.go b/skate/cmd/skate-cdx-lookup/main.go index e26102f..b480078 100644 --- a/skate/cmd/skate-cdx-lookup/main.go +++ b/skate/cmd/skate-cdx-lookup/main.go @@ -36,8 +36,11 @@ func main() { if *quiet { log.SetOutput(ioutil.Discard) } - var cache = skate.Cache{Dir: *cacheDir} - br := bufio.NewReader(r) + var ( + cache = skate.Cache{Dir: *cacheDir} + br = bufio.NewReader(r) + i int + ) for { line, err := br.ReadString('\n') if err == io.EOF { @@ -66,6 +69,7 @@ func main() { if err != nil { log.Fatal(err) } - fmt.Printf("% 10d %s\n", len(rows), line) + fmt.Printf("[%05d] % 10d %s %s\n", i, len(rows), rows.Summary(), line) + i++ } } -- cgit v1.2.3