// OPTIONS implements `Echo#OPTIONS()` for sub-routes within the Group.
509467
func (g *Group) OPTIONS(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
	return g.Add(http.MethodOptions, path, h, m...)
}
807083
func Options(pkgs []*packages.Package) ([]interface{}, error) {
	var options []interface{}
	for _, p := range pkgs {
		for _, f := range p.Syntax {
			opts, err := FileOptions(f)
			if err != nil {
				return nil, err
			}
			options = append(options, opts...)
		}
	}
	return options, nil
}
578285
func (r *Route) Options(handler http.Handler) *Route {
	r.handlers[http.MethodOptions] = handler
	return r
}
355162
func (s *Section) Option(key string) string {
	return s.Options.Get(key)
}
232713
func Options(nopts nats.Options) registry.Option {
	return func(o *registry.Options) {
		if o.Context == nil {
			o.Context = context.Background()
		}
		o.Context = context.WithValue(o.Context, optionsKey{}, nopts)
	}
}
984717
func (wfe *WebFrontEndImpl) Options(response http.ResponseWriter, request *http.Request, methodsStr string, methodsMap map[string]bool) {
	// Every OPTIONS request gets an Allow header with a list of supported methods.
	response.Header().Set("Allow", methodsStr)

	// CORS preflight requests get additional headers. See
	// http://www.w3.org/TR/cors/#resource-preflight-requests
	reqMethod := request.Header.Get("Access-Control-Request-Method")
	if reqMethod == "" {
		reqMethod = "GET"
	}
	if methodsMap[reqMethod] {
		wfe.setCORSHeaders(response, request, methodsStr)
	}
}
1180686
func (s *Server) Options(w http.ResponseWriter, req *http.Request) {
	w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
	w.WriteHeader(http.StatusOK)
}
74421
func (m *Mux) Options(pattern PatternType, handler HandlerType) {
	m.rt.handleUntyped(pattern, mOPTIONS, handler)
}
889361
func (app *App) HandleOPTIONS(newValue bool) (oldValue bool) {
	return app.defaultRouter.HandleOPTIONS(newValue)
}
1009543
func (cfg *BuildCfg) options(ctx context.Context) (fx.Option, *cfg.Config) {
	err := cfg.fillDefaults()
	if err != nil {
		return fx.Error(err), nil
	}

	repoOption := fx.Provide(func(lc fx.Lifecycle) repo.Repo {
		lc.Append(fx.Hook{
			OnStop: func(ctx context.Context) error {
				return cfg.Repo.Close()
			},
		})

		return cfg.Repo
	})

	metricsCtx := fx.Provide(func() helpers.MetricsCtx {
		return helpers.MetricsCtx(ctx)
	})

	hostOption := fx.Provide(func() libp2p.HostOption {
		return cfg.Host
	})

	routingOption := fx.Provide(func() libp2p.RoutingOption {
		return cfg.Routing
	})

	conf, err := cfg.Repo.Config()
	if err != nil {
		return fx.Error(err), nil
	}

	return fx.Options(
		repoOption,
		hostOption,
		routingOption,
		metricsCtx,
	), conf
}
139967
func (factory *TumblrBeeFactory) Options() []bees.BeeOptionDescriptor {
	opts := []bees.BeeOptionDescriptor{
		{
			Name:        "blogname",
			Description: "Name of the Tumblr blog",
			Type:        "string",
			Mandatory:   true,
		},
		{
			Name:        "consumer_key",
			Description: "Consumer Key",
			Type:        "string",
			Mandatory:   true,
		},
		{
			Name:        "consumer_secret",
			Description: "Consumer Secret",
			Type:        "string",
			Mandatory:   true,
		},
		{
			Name:        "token",
			Description: "Token",
			Type:        "string",
			Mandatory:   true,
		},
		{
			Name:        "token_secret",
			Description: "Token Secret",
			Type:        "string",
			Mandatory:   true,
		},
		{
			Name:        "callback_url",
			Description: "Callback URL",
			Type:        "url",
			Mandatory:   false,
		},
	}
	return opts
}
548888
func (e *Echo) Routes() []*Route {
	routes := make([]*Route, 0, len(e.router.routes))
	for _, v := range e.router.routes {
		routes = append(routes, v)
	}
	return routes
}
1276432
func (f *Field) Options() FieldOptions {
	f.mu.RLock()
	defer f.mu.RUnlock()
	return f.options
}
33236
func (i *Index) Options() IndexOptions {
	i.mu.RLock()
	defer i.mu.RUnlock()
	return i.options()
}
614359
func (self *Config) Options(section string) (options []string, err error) {
	if _, ok := self.data[section]; !ok {
		return nil, errors.New(sectionError(section).String())
	}

	options = make([]string, len(self.data[_DEFAULT_SECTION])+len(self.data[section]))
	i := 0
	for s, _ := range self.data[_DEFAULT_SECTION] {
		options[i] = s
		i++
	}
	for s, _ := range self.data[section] {
		options[i] = s
		i++
	}

	return options, nil
}
900733
func (m *MockRuntimeReader) Options() policy.OptionsType {
	ret := m.ctrl.Call(m, "Options")
	ret0, _ := ret[0].(policy.OptionsType)
	return ret0
}
858767
func (mh *MethodHandler) Options(options *sparta.LambdaFunctionOptions) *MethodHandler {
	mh.options = options
	return mh
}