You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
540 B
Go
30 lines
540 B
Go
package katago
|
|
|
|
import "time"
|
|
|
|
func WithOptions(opt Options) Option {
|
|
return func(options *Options) {
|
|
options.DevMode = opt.DevMode
|
|
options.MaxMessageId = opt.MaxMessageId
|
|
options.Timeout = opt.Timeout
|
|
}
|
|
}
|
|
|
|
func WithDevMode(val bool) Option {
|
|
return func(options *Options) {
|
|
options.DevMode = val
|
|
}
|
|
}
|
|
|
|
func WithMaxMessageId(max uint64) Option {
|
|
return func(options *Options) {
|
|
options.MaxMessageId = max
|
|
}
|
|
}
|
|
|
|
func WithTimeout(timeout time.Duration) Option {
|
|
return func(options *Options) {
|
|
options.Timeout = timeout
|
|
}
|
|
}
|