https://github.com/webmafia/identifier
Very fast generator of unique IDs.
https://github.com/webmafia/identifier
go golang identifier
Last synced: 23 days ago
JSON representation
Very fast generator of unique IDs.
- Host: GitHub
- URL: https://github.com/webmafia/identifier
- Owner: webmafia
- License: mit
- Created: 2024-10-17T14:36:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-29T16:45:33.000Z (over 1 year ago)
- Last Synced: 2025-03-02T03:14:21.731Z (over 1 year ago)
- Topics: go, golang, identifier
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# identifier
Very fast generator of unique IDs.
- 8 bytes decoded integer
- int64 (only 63 bits used)
- contains a unix timestamp with millisecond precision
- sequential
- sortable by time
- used in databases
- 13 bytes encoded string
- appears random
- used in JSON
## Install
```sh
go get github.com/webmafia/identifier
```
## Usage
```
id := identifier.Generate()
```