From 4642ed4bc5d95fba105f1c4c6ad2369c224fa8be Mon Sep 17 00:00:00 2001 From: Darko Luketic Date: Thu, 3 Aug 2023 14:44:56 +0200 Subject: [PATCH] readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad01d2e --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# oid36 + +encode ObjectID to Base36 and back + +```go + 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](https://github.com/martinlindhe/base36).