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 options.LineBufferSize = opt.LineBufferSize } } 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 } } func WithLineBufferSize(size int) Option { return func(options *Options) { options.LineBufferSize = size } }