mirror of
https://github.com/sony/sonyflake.git
synced 2026-11-22 08:06:28 +00:00
Remove NewSonyflake
This commit is contained in:
1 parent
c847588763
commit
313db86c15
3 files changed
+9
-14
No files matched your search
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/sony/sonyflake/v2"
|
||||
@@ -13,7 +14,11 @@ var sf *sonyflake.Sonyflake
|
||||
func init() {
|
||||
var st sonyflake.Settings
|
||||
st.MachineID = awsutil.AmazonEC2MachineID
|
||||
sf = sonyflake.NewSonyflake(st)
|
||||
var err error
|
||||
sf, err = sonyflake.New(st)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if sf == nil {
|
||||
panic("sonyflake not created")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user