Registry / utility / andersfylling-snowflake

andersfylling-snowflake

JSON →
library1.3.0gogounverified

A Go library for generating unique, time-sorted IDs based on Twitter's Snowflake algorithm.

go get github.com/andersfylling/snowflake
INSTALL
IMPORT
SIG · ANDERSFYLLING-SNOW
A
andersfylling-snowflake
utilitygov1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

snowflake
github.com/andersfylling/snowflake

Create a snowflake node and generate a unique ID.

package main import ( "fmt" "github.com/andersfylling/snowflake" ) func main() { node, err := snowflake.NewNode(1) if err != nil { panic(err) } id := node.Generate() fmt.Println(id) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.3.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Meta
1
OpenAI (training)
1
Resources
andersfylling-snowflake — go get andersfylling-snowflake · libregistry