// HandleOneway for OnewayInboundFunc
769424
func (f OnewayInboundFunc) HandleOneway(ctx context.Context, req *transport.Request, h transport.OnewayHandler) error {
	return f(ctx, req, h)
}
931682
func (l *OptionsLoader) HandleOptions(i *TreeWalkItem) error {
	contents, err := i.ReadString()
	if err != nil {
		return err
	}

	t := template.New(i.RelativePath)
	t.Funcs(l.TemplateFunctions)

	_, err = t.Parse(contents)
	if err != nil {
		return fmt.Errorf("error parsing options template %q: %v", i.Path, err)
	}

	t.Option("missingkey=zero")

	l.AddTemplate(&OptionsTemplate{
		Name:     i.RelativePath,
		Tags:     i.Tags,
		Template: t,
	})
	return nil
}
1030974
func (v *Function) GetOneWay() (o bool) {
	if v != nil && v.OneWay != nil {
		return *v.OneWay
	}

	return
}
879118
func FlatHandlerFuncWrap(h http.HandlerFunc) FlatHandler {
	return (func(c *Context, nx NextHandler) {
		h(c.Res, c.Req)
		nx(c)
	})
}
584758
func (res *Resolver) HandleNonMesos(fwd exchanger.Forwarder) func(
	dns.ResponseWriter, *dns.Msg) {
	return func(w dns.ResponseWriter, r *dns.Msg) {
		logging.CurLog.NonMesosRequests.Inc()
		m, err := fwd(r, w.RemoteAddr().Network())
		if err != nil {
			m = new(dns.Msg).SetRcode(r, rcode(err))
		} else if len(m.Answer) == 0 {
			logging.CurLog.NonMesosNXDomain.Inc()
		}
		reply(w, m, res.config.SetTruncateBit)
	}
}
864439
func NewHandle(nlFamilies ...int) (*Handle, error) {
	return newHandle(netns.None(), netns.None(), nlFamilies...)
}
1332350
func (s *Secure) HandlerFuncWithNextForRequestOnly(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
	// Let secure process the request. If it returns an error,
	// that indicates the request should not continue.
	responseHeader, r, err := s.processRequest(w, r)

	// If there was an error, do not call next.
	if err == nil && next != nil {
		// Save response headers in the request context
		ctx := context.WithValue(r.Context(), ctxSecureHeaderKey, responseHeader)

		// No headers will be written to the ResponseWriter.
		next(w, r.WithContext(ctx))
	}
}
170462
func (m *ServeMux) HandleFunc(method string, path string, h interface{}) {
	m.Handle(method, path, &handlerContainerImpl{
		handler: h,
		Context: background,
	})
}
766734
func (o *Outbound) CallOneway(ctx context.Context, treq *transport.Request) (transport.Ack, error) {
	if treq == nil {
		return nil, yarpcerrors.InvalidArgumentErrorf("request for http oneway outbound was nil")
	}

	_, err := o.call(ctx, treq)
	if err != nil {
		return nil, err
	}

	return time.Now(), nil
}
518065
func (s *Secure) HandlerFuncWithNext(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
	// Let secure process the request. If it returns an error,
	// that indicates the request should not continue.
	responseHeader, r, err := s.processRequest(w, r)
	addResponseHeaders(responseHeader, w)

	// If there was an error, do not call next.
	if err == nil && next != nil {
		next(w, r)
	}
}
734511
func OnewayProcedure(name string, handler OnewayHandler) []transport.Procedure {
	return []transport.Procedure{
		{
			Name:        name,
			HandlerSpec: transport.NewOnewayHandlerSpec(rawOnewayHandler{handler}),
		},
	}
}
99340
func (s *Subrouter) HandleFunc(method string, path string, f func(w http.ResponseWriter, r *http.Request)) {
	s.Handle(method, path, http.HandlerFunc(f))
}
816089
func handleNewCommand() {
	currentLocation, err := os.Getwd()
	if err != nil {
		logger.Error(err.Error())
		os.Exit(0)
	}
	projectLocation := currentLocation + "/" + *projectName

	var template scripts.Template = nil

	if len(*templateName) == 0 {
		logger.Info("Creating Neo project")
		template = &scripts.NeoTemplate{}
	} else {
		switch *templateName {
		case "angular":
			logger.Info("Creating Neo Angular project")
			template = &scripts.AngularTemplate{}
		case "html":
			logger.Info("Creating Neo HTML project")
			template = &scripts.NeoHtmlTemplate{}
		}
	}

	if template == nil {
		logger.Errorf("Unkonown template %s!", *templateName)
	} else {
		template.Build(projectLocation)
	}
}
819333
func (r *Router) HandleFunc(path string, handler http.HandlerFunc, httpMethods ...string) *Trie {
	return r.Handle(path, handler, httpMethods...)
}
596506
func HandleFunc(method string, path string, h interface{}) {
	DefaultMux.HandleFunc(method, path, h)
}
272027
func (mux *ServeMux) HandleFunc(m Matcher, h HandlerFunc) {
	mux.Handle(m, h)
}
437829
func (w *walletAPIHandler) handleV1(ctx context.Context, c Call, wr io.Writer) error {
	if !validWalletMethodsV1[c.Method] {
		return ErrInvalidMethod{name: c.Method, version: 1}
	}

	cli, err := GetWalletClient(w.G())
	if err != nil {
		return err
	}
	w.cli = cli

	switch c.Method {
	case balancesMethod:
		return w.balances(ctx, c, wr)
	case batchMethod:
		return w.batch(ctx, c, wr)
	case cancelMethod:
		return w.cancelPayment(ctx, c, wr)
	case detailsMethod:
		return w.details(ctx, c, wr)
	case getInflationMethod:
		return w.getInflation(ctx, c, wr)
	case historyMethod:
		return w.history(ctx, c, wr)
	case initializeMethod:
		return w.initializeWallet(ctx, c, wr)
	case lookupMethod:
		return w.lookup(ctx, c, wr)
	case sendMethod:
		return w.send(ctx, c, wr)
	case setInflationMethod:
		return w.setInflation(ctx, c, wr)
	default:
		return ErrInvalidMethod{name: c.Method, version: 1}
	}
}