Skip to content

Commit

Permalink
Merge pull request #3 from guoyk93/docs-update-readme
Browse files Browse the repository at this point in the history
docs: update README.md [skip ci]
  • Loading branch information
yankeguo authored Sep 7, 2023
2 parents 1df53d9 + 5bf8afa commit 6baa66d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# snowid

![workflow badge](https://github.com/guoyk93/snowid/actions/workflows/go.yml/badge.svg) [![Go Reference](https://pkg.go.dev/badge/github.com/guoyk93/snowid.svg)](https://pkg.go.dev/github.com/guoyk93/snowid)
[![workflow badge](https://github.com/guoyk93/snowid/actions/workflows/go.yml/badge.svg)](https://github.com/guoyk93/snowid/actions)
[![Go Reference](https://pkg.go.dev/badge/github.com/guoyk93/snowid.svg)](https://pkg.go.dev/github.com/guoyk93/snowid)

A concurrent-safe lock-free implementation of snowflake algorithm in Golang

## Install

`go get -u github.com/guoyk93/snowflake`
`go get -u github.com/guoyk93/snowid`

## Usage

Expand All @@ -15,7 +16,7 @@ A concurrent-safe lock-free implementation of snowflake algorithm in Golang
id, _ := strconv.ParseUint(os.Getenv("WORKER_ID"), 10, 64)

// create an instance (a sonyflake like instance)
s := snowflake.New(snowflake.Options{
s := snowid.New(snowflake.Options{
Epoch: time.Date(2020, time.January, 1, 0, 0, 0, 0, time.UTC),
ID: id,
Grain: time.Millisecond*10,
Expand Down

0 comments on commit 6baa66d

Please sign in to comment.