From bbd83e46182f1c7dd0fabd9ad389e8595622a079 Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Thu, 16 Jul 2020 08:31:09 -0500 Subject: [PATCH] . --- rbf/internal_test.go | 6 ++++-- rbf/rbf.go | 6 ------ rbf/wal_test.go | 5 +++++ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rbf/internal_test.go b/rbf/internal_test.go index 9711384cc..f0c260938 100644 --- a/rbf/internal_test.go +++ b/rbf/internal_test.go @@ -14,13 +14,15 @@ package rbf -import "testing" +import ( + "testing" +) // This function exists to mark debugging helper function as "used" by the linter. func TestUsed(t *testing.T) { t.Skip("This function is always skipped") dump(nil) - hexdump(nil) + //hexdump(nil) pagedumpi(nil, "", nil) treedump(nil, 0, "", nil) } diff --git a/rbf/rbf.go b/rbf/rbf.go index 6b58c5b6b..cc0132599 100644 --- a/rbf/rbf.go +++ b/rbf/rbf.go @@ -486,12 +486,6 @@ func search(n int, f func(int) int) (index int, exact bool) { return i, false } -/* lint -func itohex(v int) string { return fmt.Sprintf("0x%x", v) } - -func hexdump(b []byte) { println(hex.Dump(b)) } -*/ - func pagedumpi(b []byte, indent string, writer io.Writer) { pgno := readPageNo(b) if pgno == Magic32() { diff --git a/rbf/wal_test.go b/rbf/wal_test.go index 53349c001..0e201b01a 100644 --- a/rbf/wal_test.go +++ b/rbf/wal_test.go @@ -17,6 +17,7 @@ package rbf_test import ( "bytes" "encoding/hex" + "fmt" "io/ioutil" "math/rand" "os" @@ -26,6 +27,10 @@ import ( "github.com/pilosa/pilosa/v2/rbf" ) +func itohex(v int) string { return fmt.Sprintf("0x%x", v) } + +func hexdump(b []byte) { println(hex.Dump(b)) } + func TestWALSegment_Open(t *testing.T) { t.Run("OK", func(t *testing.T) { s := MustOpenWALSegment(t, 10)