func OptDiscardLabels() Option {
	return func(o *Options) {
		o.KeepLabels = false
	}
}
OptDiscardLabels sets Options.KeepLabels to false, discarding all labels that were
unmarshaled into other fields.
package labeler
import (
	"reflect"
	"strings"
)
func getDefaultOptions() Options {
	o := Options{
		Tag:                "label",
		ContainerToken:     "*",
		FloatFormat:        'f',
		ComplexFormat:      'f',
		IntBase:            10,
		UintBase:           10,
		OmitEmpty:          true,
		IgnoreCase:         true,
		KeepLabels:         true,
		DefaultToken:       "default",
		FormatToken:        "format",
		FloatFormatToken:   "floatformat",
		ComplexFormatToken: "complexformat",
		TimeFormatToken:    "timeformat",
		CaseSensitiveToken: "casesensitive",
		OmitEmptyToken:     "omitempty",
		IncludeEmptyToken:  "includeempty",
		IgnoreCaseToken:    "ignorecase",
		KeepToken:          "keep",
		DiscardToken:       "discard",
		BaseToken:          "base",
		UintBaseToken:      "uintbase",
		IntBaseToken:       "intbase",
		SplitToken:         "split",
		Separator:          ",",
		AssignmentStr:      ":",
		TimeFormat:         "",
		ContainerField:     "",
		Split:              ",",
	}
	return o
}
var defaultTokenParsers = getTokenParsers(getDefaultOptions())
type Options struct {
	Tag string `option:"token"`
	Separator string `option:"token"`
	Split string
	IgnoreCase bool
	ContainerField string
	KeepLabels bool
	OmitEmpty bool
	Default string
	TimeFormat string
	IntBase int
	UintBase int
	ContainerToken string `option:"token"`
	DefaultToken string `option:"token"`
	KeepToken string `option:"token"`
	DiscardToken string `option:"token"`
	CaseSensitiveToken string `option:"token"`
	IgnoreCaseToken string `option:"token"`
	OmitEmptyToken string `option:"token"`
	IncludeEmptyToken string `option:"token"`
	AssignmentStr string `option:"token"`
	FormatToken string `option:"token"`
	FloatFormat byte `option:"floatformat"`
	FloatFormatToken string `option:"token"`
	ComplexFormatToken string `option:"token"`
	ComplexFormat byte `option:"floatformat"`
	TimeFormatToken string `option:"token"`
	BaseToken string `option:"token"`
	UintBaseToken string `option:"token"`
	IntBaseToken string `option:"token"`
	SplitToken   string `option:"token"`
	tokenParsers tagTokenParsers
	unmarshaling bool
}
func (o Options) FromTag(t *Tag) Options {
	if t == nil {
		return o
	}
	if t.ComplexFormat != 0 {
		o.ComplexFormat = t.ComplexFormat
	}
	if t.FloatFormat != 0 {
		o.FloatFormat = t.FloatFormat
	}
	if t.UintBaseIsSet {
		o.UintBase = t.UintBase
	}
	if t.IntBaseIsSet {
		o.IntBase = t.IntBase
	}
	if t.TimeFormat != "" {
		o.TimeFormat = t.TimeFormat
	}
	if t.KeepIsSet {
		o.KeepLabels = t.Keep
	}
	if t.IgnoreCaseIsSet {
		o.IgnoreCase = t.IgnoreCase
	}
	if t.OmitEmptyIsSet {
		o.OmitEmpty = true
	}
	if t.IncludeEmptyIsSet {
		o.OmitEmpty = false
	}
	return o
}
type Option func(o *Options)
func OptCaseSensitive() Option {
	return func(o *Options) {
		o.IgnoreCase = false
	}
}
func OptContainerField(field string) Option {
	return func(o *Options) {
		o.ContainerField = field
	}
}
func OptKeepLabels() Option {
	return func(o *Options) {
		o.KeepLabels = true
	}
}