Skip to content

Instantly share code, notes, and snippets.

// Test code to show the Badger MergeOperator merging the deleted previous value with the new added values
func add(originalValue, newValue []byte) []byte {
return append(originalValue, newValue...)
}
func main() {
opts := badger.DefaultOptions("./testdata")
db, err := badger.Open(opts)
if err != nil {