package ncmd import ( "git.noahlan.cn/noahlan/ntool/ndef" ) func WithOptions(o *Options) Option { return func(opt *Options) { opt = o } } func WithMarshaler(marshaler ndef.Marshaler) Option { return func(opt *Options) { opt.Marshaler = marshaler } } func WithBuffered(v bool) Option { return func(opt *Options) { opt.Buffered = v } } func WithCombinedOutput() Option { return func(opt *Options) { opt.CombinedOutput = true } } func WithStreaming() Option { return func(opt *Options) { opt.Streaming = true } } func WithLineBufferSize(size uint) Option { return func(opt *Options) { opt.LineBufferSize = size } } func WithDevMode(val bool) Option { return func(opt *Options) { opt.DevMode = val } }