https://github.com/appointy/idgen
Generates url safe lexically sorted universally unique ids with a prefix in go
https://github.com/appointy/idgen
golang id idgen ids stripe ulid uuid uuid-generator
Last synced: about 1 year ago
JSON representation
Generates url safe lexically sorted universally unique ids with a prefix in go
- Host: GitHub
- URL: https://github.com/appointy/idgen
- Owner: Appointy
- License: mit
- Created: 2018-11-14T03:57:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-29T07:20:32.000Z (about 7 years ago)
- Last Synced: 2024-06-19T05:41:04.274Z (about 2 years ago)
- Topics: golang, id, idgen, ids, stripe, ulid, uuid, uuid-generator
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idgen
[](https://goreportcard.com/report/github.com/appointy/idgen)
[](https://travis-ci.org/appointy/idgen)
[](http://gocover.io/github.com/appointy/idgen)
[](https://opensource.org/licenses/MIT)
Generates url safe lexically sorted universally unique ids with a prefix in go. Inspired from Stripe.
## Usage
```go
package main
import (
"fmt"
"github.com/appointy/idgen"
)
func main() {
id := idgen.New("cus")
fmt.Println(id)
// Output: cus_0000XSNJG0MQJHBF4QX1EFD6Y3
}
```
### Depends on
[oklog/ulid](https://github.com/oklog/ulid)