// FlagErrorFunc returns either the function set by SetFlagErrorFunc for this
// command or a parent, or it returns a function which returns the original
// error.
165490
func (c *Command) FlagErrorFunc() (f func(*Command, error) error) {
	if c.flagErrorFunc != nil {
		return c.flagErrorFunc
	}

	if c.HasParent() {
		return c.parent.FlagErrorFunc()
	}
	return func(c *Command, err error) error {
		return err
	}
}
258128
func CallFunc(receiver interface{}, methodName string, args ...interface{}) interface{} {
	var ptr reflect.Value
	var value reflect.Value

	value, ok := receiver.(reflect.Value)

	if !ok {
		value = reflect.ValueOf(receiver)
	}

	funcArgs := WrapArguments(args...)

	ptr, value = getReflectPtrAndValue(value, receiver)

	method := value.MethodByName(methodName)

	if method.IsValid() {
		return UnwrapReflectValues(method.Call(funcArgs))
	}

	method = ptr.MethodByName(methodName)

	if method.IsValid() {
		return UnwrapReflectValues(method.Call(funcArgs))
	}

	panic(fmt.Sprintf("%T type objects don't have %s method.", value.Interface(), methodName))
}
697130
func Errorf(defaultValue string, args ...int) error {
	return errors.New(T(defaultValue, args...))
}
92637
func Errorf(err error, msg string, format ...interface{}) error {
	return NestedError{
		NestedErr: err,
		Err:       fmt.Errorf(msg, format...),
	}
}
98332
func (l *Logger) ErrorF(format string, args ...interface{}) {
	l.textLogger.Errorf(format, args...)
}
856481
func Errorf(level string, format string, args ...interface{}) {
	ErrorWithStackSkip(level, fmt.Errorf(format, args...), 1)
}
414899
func Errorf(f func(string, ...interface{})) Option {
	return func(c *Client) error {
		c.errf = f
		return nil
	}
}
239665
func ContainErrorFunc(err error, equalFunc func(error) bool) bool {
	errobj := castErrorObject(nil, 1, err)
	contain := false

	if walkerr := WalkErrors(errobj, func(errcomp ErrorObject) (stop bool, walkerr error) {
		if equalFunc(errcomp) {
			contain = true
			return true, nil
		}
		return false, nil
	}); walkerr != nil {
		return false
	}

	return contain
}
762551
func (r *Route) HandlerFunc(f func(context.Context, http.ResponseWriter, *http.Request) error) *Route {
	return r.Handler(HandlerFunc(f))
}
732001
func (f *file) lintErrorf() {
	f.walk(func(node ast.Node) bool {
		ce, ok := node.(*ast.CallExpr)
		if !ok || len(ce.Args) != 1 {
			return true
		}
		isErrorsNew := isPkgDot(ce.Fun, "errors", "New")
		var isTestingError bool
		se, ok := ce.Fun.(*ast.SelectorExpr)
		if ok && se.Sel.Name == "Error" {
			if typ := f.pkg.typeOf(se.X); typ != nil {
				isTestingError = typ.String() == "*testing.T"
			}
		}
		if !isErrorsNew && !isTestingError {
			return true
		}
		if !f.imports("errors") {
			return true
		}
		arg := ce.Args[0]
		ce, ok = arg.(*ast.CallExpr)
		if !ok || !isPkgDot(ce.Fun, "fmt", "Sprintf") {
			return true
		}
		errorfPrefix := "fmt"
		if isTestingError {
			errorfPrefix = f.render(se.X)
		}
		p := f.errorf(node, 1, category("errors"), "should replace %s(fmt.Sprintf(...)) with %s.Errorf(...)", f.render(se), errorfPrefix)

		m := f.srcLineWithMatch(ce, `^(.*)`+f.render(se)+`\(fmt\.Sprintf\((.*)\)\)(.*)$`)
		if m != nil {
			p.ReplacementLine = m[1] + errorfPrefix + ".Errorf(" + m[2] + ")" + m[3]
		}

		return true
	})
}
281723
func TypeErrorf(obj interface{}, msgFormat string, args ...interface{}) error {
	return errorf(pretty.Sprintf(msgFormat, args...), "unrecognized type (%s)", reflect.TypeOf(obj))
}
98290
func (l *BeeLogger) Errorf(message string, vars ...interface{}) {
	l.mustLog(levelError, message, vars...)
}
49058
func RecoveryHandlerFunc(p interface{}) (err error) {
	// print stack to stderr
	debug.PrintStack()
	// return grpc error

	switch x := p.(type) {
	case *logrus.Entry:
		return status.Errorf(codes.Internal, "%s", x.Message)
	}

	return status.Errorf(codes.Internal, "%s", p)
}
410380
func SetErrorCallback(cbfun func(code ErrorCode, desc string)) {
	if cbfun == nil {
		C.glfwSetErrorCallback(nil)
	} else {
		fErrorHolder = cbfun
		C.glfwSetErrorCallbackCB()
	}
}
747218
func (s *StanLogger) Errorf(format string, v ...interface{}) {
	s.executeLogCall(func(log Logger, format string, v ...interface{}) {
		log.Errorf(format, v...)
	}, format, v...)
}
423688
func (l *tomlLexer) errorf(format string, args ...interface{}) tomlLexStateFn {
	l.tokens = append(l.tokens, token{
		Position: Position{l.line, l.col},
		typ:      tokenError,
		val:      fmt.Sprintf(format, args...),
	})
	return nil
}
1339129
func (g *GRPCLogger) Errorf(format string, args ...interface{}) {
	g.Error(fmt.Sprintf(format, args...))
}