func init() {
	var st sonyflake.Settings
	st.MachineID = awsutil.AmazonEC2MachineID
	sf = sonyflake.NewSonyflake(st)
	if sf == nil {
		panic("sonyflake not created")
	}
}
Exemple #2
0
func init() {
	var st sonyflake.Settings
	// st.StartTime = time.Now()
	// st.MachineID = awsutil.AmazonEC2MachineID
	st.MachineID = machineid.MachineID
	sf = sonyflake.NewSonyflake(st)
	if sf == nil {
		panic("sonyflake not created")
	}
}