go-id-worker
IdWorker in golang.
go-id-worker is an id creator. For generating an global unique id. The type of id is int64.
You can get it like this.
go get "github.com/gitstliu/go-id-worker"
And import it like this.
import (
"github.com/gitstliu/go-id-worker"
)
Create and use an idWorker like this.
currWoker := &idworker.IdWorker{}
currWoker.InitIdWorker(1000, 1)
newId := currWoker.NexiId()