timestee/optiongen

should copy the filed's comment if it does have to the generated options func

Closed this issue · 1 comments

// true for single user connection(better performance)
"TCPNoDelay":      true,

should generate code like:

// WithTCPNoDelay , true for single user connection(better performance)
func WithTCPNoDelay(v bool) SpecOption {
	return func(cc *Spec) SpecOption {
		previous := cc.TCPNoDelay
		cc.TCPNoDelay = v
		return WithTCPNoDelay(previous)
	}
}

fixed #4