internal/base36 | ||
go.mod | ||
go.sum | ||
oid36_test.go | ||
oid36.go | ||
README.md |
oid36
encode ObjectID to Base36 and back
id := primitive.NewObjectID().Hex()
fmt.Println(id)
out, e := oid36.ObjectIDToBase36(id)
if e != nil {
t.Error(e)
t.Fail()
return
}
fmt.Println(out)
Acknowledgements
Shamelessly stolen base36 code from github.com/martinlindhe/base36.