Go to file
Darko Luketic 4642ed4bc5 readme 2023-08-03 14:44:56 +02:00
internal/base36 initial 2023-08-03 14:44:03 +02:00
README.md readme 2023-08-03 14:44:56 +02:00
go.mod initial 2023-08-03 14:44:03 +02:00
go.sum initial 2023-08-03 14:44:03 +02:00
oid36.go initial 2023-08-03 14:44:03 +02:00
oid36_test.go initial 2023-08-03 14:44:03 +02:00

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.