Fix PrimaryKey Marshalling and add Bolt test

Based on LevelDB test exactly. Sure enough, it found a bug.
This commit is contained in:
Barak Michener 2015-02-21 18:25:00 -05:00
parent cf3e286d15
commit bffcd47257
3 changed files with 471 additions and 4 deletions

View file

@ -74,7 +74,7 @@ func (p *PrimaryKey) String() string {
return strconv.FormatInt(p.sequentialID, 10)
}
func (p *PrimaryKey) MarshalJSON() ([]byte, error) {
func (p PrimaryKey) MarshalJSON() ([]byte, error) {
return json.Marshal(p.sequentialID)
}