Add a LevelDB database
This commit is contained in:
parent
25a4d7be2c
commit
444d064ba9
8 changed files with 136 additions and 75 deletions
|
|
@ -11,9 +11,9 @@ func (i *Identifier) ToString() string {
|
|||
return base64.RawURLEncoding.EncodeToString(*i)
|
||||
}
|
||||
|
||||
func (i *Identifier) MarshalJSON() (dst []byte, err error) {
|
||||
dst = make([]byte, base64.RawURLEncoding.EncodedLen(len(*i)))
|
||||
base64.RawURLEncoding.Encode(dst, *i)
|
||||
func (i Identifier) MarshalJSON() (dst []byte, err error) {
|
||||
dst = make([]byte, base64.RawURLEncoding.EncodedLen(len(i)))
|
||||
base64.RawURLEncoding.Encode(dst, i)
|
||||
dst = append([]byte{'"'}, dst...)
|
||||
dst = append(dst, '"')
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue