21 lines
317 B
Go
21 lines
317 B
Go
package snowflake
|
|
|
|
type options struct {
|
|
startTime string
|
|
machineId int64
|
|
}
|
|
|
|
type Option func(o *options)
|
|
|
|
func WithStartTime(startTime string) Option {
|
|
return func(o *options) {
|
|
o.startTime = startTime
|
|
}
|
|
}
|
|
|
|
func WithMachineId(machineId int64) Option {
|
|
return func(o *options) {
|
|
o.machineId = machineId
|
|
}
|
|
}
|