readme
This commit is contained in:
parent
9adac9b32a
commit
4642ed4bc5
1 changed files with 19 additions and 0 deletions
19
README.md
Normal file
19
README.md
Normal file
|
|
@ -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).
|
||||
Loading…
Add table
Add a link
Reference in a new issue