Skip to content

Commit

Permalink
structure: fix make check
Browse files Browse the repository at this point in the history
  • Loading branch information
siddontang committed Oct 20, 2015
1 parent 8a648e6 commit aebb943
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions structure/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (t *TStructure) loadListMeta(metaKey []byte) (listMeta, error) {
func adjustIndex(index int64, min, max int64) int64 {
if index >= 0 {
return index + min
} else {
return index + max
}

return index + max
}
2 changes: 1 addition & 1 deletion structure/structure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type testStructureSuite struct {
func (s *testStructureSuite) SetUpSuite(c *C) {
path := "memory:"
d := localstore.Driver{
goleveldb.MemoryDriver{},
Driver: goleveldb.MemoryDriver{},
}
store, err := d.Open(path)
c.Assert(err, IsNil)
Expand Down
14 changes: 10 additions & 4 deletions structure/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ import (
type TypeFlag byte

const (
// StringMeta is the flag for string meta.
StringMeta TypeFlag = 'S'
// StringData is the flag for string data.
StringData TypeFlag = 's'
HashMeta TypeFlag = 'H'
HashData TypeFlag = 'h'
ListMeta TypeFlag = 'L'
ListData TypeFlag = 'l'
// HashMeta is the flag for hash meta.
HashMeta TypeFlag = 'H'
// HashData is the flag for hash data.
HashData TypeFlag = 'h'
// ListMeta is the flag for list meta.
ListMeta TypeFlag = 'L'
// ListData is the flag for list data.
ListData TypeFlag = 'l'
)

func encodeStringDataKey(key []byte) []byte {
Expand Down

0 comments on commit aebb943

Please sign in to comment.