// OptFieldTypeSet is a functional option on FieldOptions
// used to specify the field as being type `set` and to
// provide any respective configuration values.
185365
func OptFieldTypeSet(cacheType string, cacheSize uint32) FieldOption {
	return func(fo *FieldOptions) error {
		if fo.Type != "" {
			return errors.Errorf("field type is already set to: %s", fo.Type)
		}
		fo.Type = FieldTypeSet
		fo.CacheType = cacheType
		fo.CacheSize = cacheSize
		return nil
	}
}
17711
func findFieldOfType(reply reflect.Type, fieldName string) (reflect.StructField, bool) {
	for reply.Kind() == reflect.Ptr {
		reply = reply.Elem()
	}
	if reply.Kind() == reflect.Struct {
		field, found := reply.FieldByName(fieldName)
		return field, found
	}
	return reflect.StructField{}, false
}
508562
func (me *TxsdPlatformTypeChoiceOxfordNanoporeSequenceInstrumentModel) Set(s string) {
	(*xsdt.String)(me).Set(s)
}
820629
func NewOptType(s string) (optType, error) {
	var e optType
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}
1009673
func (o *IntOptions) set(name string, value OptionSetting) {
	o.enable(name)
	o.Opts[name] = value
}
1338261
func setIndexKind(fs *fieldSpec, fieldType reflect.Type) error {
	switch {
	case typeIsNumeric(fieldType):
		fs.indexKind = numericIndex
	case typeIsString(fieldType):
		fs.indexKind = stringIndex
	case typeIsBool(fieldType):
		fs.indexKind = booleanIndex
	default:
		return fmt.Errorf("zoom: Requested index on unsupported type %s", fieldType.String())
	}
	return nil
}
1074781
func (q *SearchSortField) Type(value string) *SearchSortField {
	q.options["type"] = value
	return q
}
821756
func NewOptionsWithFlagSet(set *flag.FlagSet) *Options {
	toolbox.Dump(set)

	var result = &Options{}
	result.Dest = set.Lookup(optionKeyDest).Value.String()
	result.Source = set.Lookup(optionKeySource).Value.String()
	result.PoolObjects = toolbox.AsBoolean(set.Lookup(optionKeyPoolObjects).Value.String())
	result.TagName = set.Lookup(optionKeyTagName).Value.String()
	result.Types = strings.Split(set.Lookup(optionKeyTypes).Value.String(), ",")
	result.Pkg = set.Lookup(optionKeyPkg).Value.String()
	if result.Source == "" {
		result.Source = url.NewResource(".").ParsedURL.Path
	}
	return result
}
1025329
func (me *TxsdPlatformTypeChoiceAbiSolidSequenceInstrumentModel) Set(s string) {
	(*xsdt.String)(me).Set(s)
}
532857
func (o *Options) Set(optFns ...func(*Options)) {
	for _, fn := range optFns {
		fn(o)
	}
}
429646
func (p *parser) setOptions(opts []Option) {
	for _, opt := range opts {
		opt(p)
	}
}
738409
func PutDefault(ch *Changeset, field string, value interface{}, opts ...Option) {
	options := Options{
		message: PutDefaultErrorMessage,
	}
	options.apply(opts)

	if typ, exist := ch.types[field]; exist {
		valTyp := reflect.TypeOf(value)
		if valTyp.ConvertibleTo(typ) {
			if ch.changes[field] == nil {
				ch.changes[field] = value
			}
			return
		}
	}

	msg := strings.Replace(options.message, "{field}", field, 1)
	AddError(ch, field, msg)
}
992257
func (f *Field) Type() string {
	f.mu.RLock()
	defer f.mu.RUnlock()
	return f.options.Type
}
740593
func (a *ArgType) TemplateSet() *TemplateSet {
	if a.templateSet == nil {
		a.templateSet = &TemplateSet{
			funcs: a.NewTemplateFuncs(),
			l:     a.TemplateLoader,
			tpls:  map[string]*template.Template{},
		}
	}

	return a.templateSet
}
1291127
func OptSetPluginTags(tags map[string]map[string]string) pluginManagerOpt {
	return func(p *pluginManager) {
		p.pluginTags = tags
	}
}
398788
func (renderer *renderer) Fieldsets(fields []Field) (f []fieldset, err error) {
	if len(fields) > 0 {
		for _, field := range fields {
			cur := fieldset{}
			cur.AmqpType, err = renderer.FieldType(field)
			if err != nil {
				return
			}

			cur.NativeType, err = renderer.NativeType(cur.AmqpType)
			if err != nil {
				return
			}
			cur.Fields = append(cur.Fields, field)
			f = append(f, cur)
		}

		i, j := 0, 1
		for j < len(f) {
			if f[i].AmqpType == f[j].AmqpType {
				f[i].Fields = append(f[i].Fields, f[j].Fields...)
			} else {
				i++
				f[i] = f[j]
			}
			j++
		}
		return f[:i+1], nil
	}

	return
}
252249
func (d *CodeGenOptions) Set(optFns ...func(*CodeGenOptions)) {
	for _, fn := range optFns {
		fn(d)
	}
}