LevelDB doesn't actually care if you store string values or arbitrary binary bytes—we've already seen how you can just push the structure into a record and that the
Slice structure works with binary for keys and values. If you want an efficient, unique, compact key, storing a binary integer is an obvious choice for all or part of a key, such as our nameId.
BytewiseComparator, used by default, will cause problems if you try making keys using integers straight from memory. Both Intel and ARM chips (Mac and iPhone) store integers in
Little Endian order which means the least-significant byte is to the left and sorting of an integer key by bytes won't work. This is only a problem if you want the keys ...