Escape MongoDB keys for characters . , $ , & , + , * , ? , ] , [ , ) , ( , | , . , } and { .
package main
import {
me "github.com/gouserdev/mongo_escape"
}
func main() {
me.Escape("event.thing")
// event\uFF0Ething
me.Unescape("event\uFF0Ething")
// event.thing
me.Escape("event$thing")
// event\uFF04thing
me.Unescape("event\uFF04thing")
// event$thing
}
https://github.com/segment-boneyard/go-mongo-key-escape
MIT