Refactor repository structure

Merge Map data type into Tree.
This commit is contained in:
Alexander Neumann
2015-01-10 23:40:10 +01:00
parent bdcdcdea7d
commit 203a911de9
26 changed files with 939 additions and 681 deletions

View File

@@ -36,6 +36,12 @@ func (id ID) String() string {
return hex.EncodeToString(id)
}
const shortStr = 4
func (id ID) Str() string {
return hex.EncodeToString(id[:shortStr])
}
// Equal compares an ID to another other.
func (id ID) Equal(other ID) bool {
return bytes.Equal(id, other)