// MatchOptions returns a function that performs a case insensitive comparison
// against the given list of options.  To make a verification function that
// accepts an empty default, include an empty string in the list.
558364
func MatchOptions(options []string, errmsg string) VerifyFunc {
	return func(s string) (ok bool, msg string, err error) {
		for _, opt := range options {
			if strings.ToLower(opt) == strings.ToLower(s) {
				return true, "", nil
			}
		}
		return false, errmsg, nil
	}
}
226222
func Options(url string, ro *RequestOptions) (*Response, error) {
	return DoRegularRequest("OPTIONS", url, ro)
}
1354982
func Options(url string, v ...interface{}) (*Resp, error) {
	return std.Options(url, v...)
}
1082051
func Matchkeys(values, keys, searchset cty.Value) (cty.Value, error) {
	return MatchkeysFunc.Call([]cty.Value{values, keys, searchset})
}
593315
func (m Matcher) Fn() MatchFn {
	switch m.matchType {
	case PathEqual:
		return m.matchPathFn(func(s, t string) bool { return s == t })
	case PathContains:
		return m.matchPathFn(strings.Contains)
	case PathPrefix:
		return m.matchPathFn(strings.HasPrefix)
	case ExecutableEqual:
		return m.matchExecutableFn(func(s, t string) bool { return s == t })
	default:
		return nil
	}
}
1155976
func Options(pattern web.PatternType, handler web.HandlerType) {
	DefaultMux.Options(pattern, handler)
}
726807
func (r *Matcher) Matches() bool {
	return r.scope() &&
		r.operation() &&
		r.group() &&
		r.version() &&
		r.resource()
}
938000
func (l *lex) matchFirst(args ...string) bool {
	for _, m := range args {
		if l.match(m) {
			return true
		}
	}
	return false
}
914869
func checkOptions(options map[string]interface{}) (tokenAccessOptions, error) {
	var opts tokenAccessOptions

	keys := []string{"realm", "issuer", "service", "rootcertbundle"}
	vals := make([]string, 0, len(keys))
	for _, key := range keys {
		val, ok := options[key].(string)
		if !ok {
			return opts, fmt.Errorf("token auth requires a valid option string: %q", key)
		}
		vals = append(vals, val)
	}

	opts.realm, opts.issuer, opts.service, opts.rootCertBundle = vals[0], vals[1], vals[2], vals[3]

	autoRedirectVal, ok := options["autoredirect"]
	if ok {
		autoRedirect, ok := autoRedirectVal.(bool)
		if !ok {
			return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect")
		}
		opts.autoRedirect = autoRedirect
	}

	return opts, nil
}
301344
func (c *sass) Option(opts ...option) error {
	for _, opt := range opts {
		err := opt(c)
		if err != nil {
			return err
		}
	}
	return nil
}
244957
func (r *Request) MatchParams(params map[string]string) *Request {
	query := r.URLStruct.Query()
	for key, value := range params {
		query.Set(key, value)
	}
	r.URLStruct.RawQuery = query.Encode()
	return r
}
195215
func Options(path string, h interface{}, m ...interface{}) {
	Default.Options(path, h, m...)
}
1115108
func WithPlatformMatcher(m platforms.MatchComparer) RemoteOpt {
	return func(_ *Client, c *RemoteContext) error {
		c.PlatformMatcher = m
		return nil
	}
}
344272
func NewOptions(opts []*container.Container, index map[string]*container.Container) Matcher {
	return &options{
		options: opts,
		index:   index,
	}
}
556563
func (r *Request) ApplyOptions(opts ...Option) {
	for _, opt := range opts {
		opt(r)
	}
}
254919
func mergeOptions(options ...map[int]interface{}) map[int]interface{} {
	rst := make(map[int]interface{})

	for _, m := range options {
		for k, v := range m {
			rst[k] = v
		}
	}

	return rst
}
921775
func (p Path) findOption(name string) *Option {
	for i := len(p) - 1; i >= 0; i-- {
		o := p[i].Option(name)
		if o != nil {
			return o
		}
	}
	return nil
}