1234567891011121314151617181920212223 |
- package id
- import (
- "time"
- "github.com/sony/sonyflake"
- //"github.com/sony/sonyflake/awsutil"
- )
- var sf *sonyflake.Sonyflake
- func init() {
- st := sonyflake.Settings{
- //MachineID: awsutil.AmazonEC2MachineID,
- StartTime: time.Date(2010, time.October, 10, 10, 10, 10, 0, time.UTC),
- }
- sf = sonyflake.NewSonyflake(st)
- if sf == nil {
- panic("init unique id panic")
- }
- }
|