loopdb: make new loopdb package to house persistent storage

This commit is contained in:
Olaoluwa Osuntokun 2019-03-06 18:19:57 -08:00
parent 74cf29a9cf
commit cdcb9f8345
12 changed files with 589 additions and 442 deletions

8
loopdb/codec.go Normal file
View file

@ -0,0 +1,8 @@
package loopdb
// itob returns an 8-byte big endian representation of v.
func itob(v uint64) []byte {
b := make([]byte, 8)
byteOrder.PutUint64(b, v)
return b
}