https://github.com/codehakase/uid
Little Go (golang) package to generate a URL safe string.
https://github.com/codehakase/uid
Last synced: 6 months ago
JSON representation
Little Go (golang) package to generate a URL safe string.
- Host: GitHub
- URL: https://github.com/codehakase/uid
- Owner: codehakase
- Created: 2018-03-17T00:50:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-17T01:02:37.000Z (almost 8 years ago)
- Last Synced: 2025-04-06T04:16:55.335Z (10 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unique ID generator
This is a very simple package that generates URL safe unique IDs.
> Note: This isn't safe for production use yet
## Example Usage
### Install
```shell
$ go get github.com/codehakase/uid
```
### Use in any part of existing code
```go
package main
import (
"fmt"
"github.com/codehakase/uid"
)
func main() {
// ...
requestID := uid.New(32) // Generates a 32 bit long random string
fmt.Println(requestID) // you'd get something like: niwVnfcOcmtWksDCNavCXeTdjWwBWZsC
}
```