Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-tennis committed Jul 3, 2023
1 parent 2788832 commit ca40192
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# snowflake
[![Go Report Card](https://goreportcard.com/badge/github.com/fish-tennis/snowflake)](https://goreportcard.com/report/github.com/fish-tennis/snowflake)
[![Go Reference](https://pkg.go.dev/badge/github.com/fish-tennis/snowflake.svg)](https://pkg.go.dev/github.com/fish-tennis/snowflake)
[![codecov](https://codecov.io/gh/fish-tennis/snowflake/branch/master/graph/badge.svg?token=L7U3HSD1FV)](https://codecov.io/gh/fish-tennis/snowflake)

an implement of snowflake by go, use atomic instead of mutex

## usage
Expand Down
2 changes: 1 addition & 1 deletion snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ func GetWorkerIdFromId(snowflakeId uint64) uint16 {

func GetSequenceFromId(snowflakeId uint64) uint16 {
return uint16(snowflakeId & maxSequence)
}
}

0 comments on commit ca40192

Please sign in to comment.