diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/merkletrie/difftree_test.go | 2 | ||||
-rw-r--r-- | utils/merkletrie/internal/fsnoder/new.go | 2 | ||||
-rw-r--r-- | utils/merkletrie/iter_test.go | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/utils/merkletrie/difftree_test.go b/utils/merkletrie/difftree_test.go index dd5b11d..9f033b1 100644 --- a/utils/merkletrie/difftree_test.go +++ b/utils/merkletrie/difftree_test.go @@ -120,7 +120,7 @@ func newChanges(original merkletrie.Changes) (changes, error) { path: c.From.String(), } default: - panic(fmt.Sprintf("unsupported action %d", c.Action)) + panic(fmt.Sprintf("unsupported action %d", action)) } } diff --git a/utils/merkletrie/internal/fsnoder/new.go b/utils/merkletrie/internal/fsnoder/new.go index 1e33020..ab749fd 100644 --- a/utils/merkletrie/internal/fsnoder/new.go +++ b/utils/merkletrie/internal/fsnoder/new.go @@ -34,7 +34,7 @@ func decodeDir(data []byte, isRoot bool) (*dir, error) { var name string switch end := bytes.IndexRune(data, dirStartMark); end { case -1: - return nil, fmt.Errorf("%c not found") + return nil, fmt.Errorf("%c not found", dirStartMark) case 0: if isRoot { name = "" diff --git a/utils/merkletrie/iter_test.go b/utils/merkletrie/iter_test.go index ba28f0b..7e8c302 100644 --- a/utils/merkletrie/iter_test.go +++ b/utils/merkletrie/iter_test.go @@ -65,7 +65,7 @@ func (t test) run(c *C, iter *merkletrie.Iter, var obtained noder.Path var err error - for i := range t.operations { + for i, b := range t.operations { comment := Commentf("\ntree: %q\ntest #%d (%q)\noperation #%d (%q)", treeDescription, testNumber, t.operations, i, t.operations[i]) @@ -81,8 +81,8 @@ func (t test) run(c *C, iter *merkletrie.Iter, c.Assert(err, IsNil) } default: - c.Fatalf("unknown operation at test %d, operation %d (%s)\n", - testNumber, i, t.operations[i]) + c.Fatalf("unknown operation at test %d, operation %d (%c)\n", + testNumber, i, b) } if i >= len(expectedChunks) { c.Assert(err, Equals, io.EOF, comment) |