Remove NewSonyflake

This commit is contained in:
Yoshiyuki Mineo committed 2025-05-02 02:42:07 +09:00
1 parent c847588763
commit 313db86c15
3 files changed
+9 -14

No files matched your search

-10
View File
@@ -98,16 +98,6 @@ func New(st Settings) (*Sonyflake, error) {
return sf, nil
}
// NewSonyflake returns a new Sonyflake configured with the given Settings.
// NewSonyflake returns nil in the following cases:
// - Settings.StartTime is ahead of the current time.
// - Settings.MachineID returns an error.
// - Settings.CheckMachineID returns false.
func NewSonyflake(st Settings) *Sonyflake {
sf, _ := New(st)
return sf
}
// NextID generates a next unique ID.
// After the Sonyflake time overflows, NextID returns an error.
// NextID generates a next unique ID as int64.