aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-20 14:31:04 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-20 14:31:04 +0200
commit8714537ecffa0641516bc01b8cdc4cdd9a9d975c (patch)
tree9e7375daf4e677c00db35a23b3ca933609b6d9ea /skate/cmd
parent7be09009b42d3af96ca8875c698922710d92d074 (diff)
downloadrefcat-8714537ecffa0641516bc01b8cdc4cdd9a9d975c.tar.gz
refcat-8714537ecffa0641516bc01b8cdc4cdd9a9d975c.zip
wip: cdx lookup
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-cdx-lookup/main.go10
1 files changed, 7 insertions, 3 deletions
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++
}
}