No Description

Darko Luketic d4bb4c598f added license 2 months ago
internal 8005f66bd1 initial 2 months ago
LICENSE d4bb4c598f added license 2 months ago
README.md 8005f66bd1 initial 2 months ago
go.mod 8005f66bd1 initial 2 months ago
go.sum 8005f66bd1 initial 2 months ago
oid36.go 8005f66bd1 initial 2 months ago
oid36_test.go 8005f66bd1 initial 2 months ago

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.

If not for tests go.mongodb.org/mongo-driver/bson would not've been a dependency.