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.
42 lines
644 B
Go
42 lines
644 B
Go
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
|
|
}
|
|
}
|