// New is an API-compatible version of the standard errors.New function. Unlike
// the stdlib errors.New, this will capture the current stack information at the
// place this error was created.
551345
func New(msg string, tags ...TagValueGenerator) error {
	tse := &terminalStackError{
		errors.New(msg), stackFrameInfo{forStack: captureStack(1)}, nil}
	if len(tags) > 0 {
		tse.tags = make(map[TagKey]interface{}, len(tags))
		for _, t := range tags {
			v := t.GenerateErrorTagValue()
			tse.tags[v.Key] = v.Value
		}
	}
	return tse
}
1040288
func NewError(code int, message string) *Error {
	return &Error{Code: code, Message: message}
}
1319966
func New(o *rules.Options) *Parser {
	if o == nil {
		return &Parser{options: defaultOptions}
	}
	return &Parser{options: o}
}
45257
func New(err error) config.Interface {
	if err == nil {
		panic("error cannot be nil")
	}
	return erroringInterface{err}
}
920579
func NewError(options ...func(*Error)) *Error {
	err := &Error{}
	for _, o := range options {
		o(err)
	}

	return err
}
331404
func New(c Config) (*Foo, error) {
	//ensure proper initialization of Foo
	foo := &Foo{
		c:    c,
		bar:  42 + c.Zip,
		bazz: 21 + c.Zop,
	}

	return foo, nil
}
258859
func NewError(code string, loc *Location, f string, a ...interface{}) *Error {
	return &Error{
		Code:     code,
		Location: loc,
		Message:  fmt.Sprintf(f, a...),
	}
}
367488
func newError(StatusCode int, Text string) *Error {
	return &Error{
		StatusCode: StatusCode,
		Text:       Text,
	}
}
612887
func newError(message string, err error) *Error {
	return &Error{
		Message:      message,
		DetailsError: err,
	}
}
1230143
func New(code int32, message string, args ...interface{}) Error {
	if len(args) > 0 {
		return &apiError{code, fmt.Sprintf(message, args...)}
	}
	return &apiError{code, message}
}
1232757
func New(stack ...Checker) *Configure {
	c := &Configure{
		options: make(map[string]*option),
		stack:   stack,
	}

	return c
}
1045949
func New(code, message string, origErr error) Error {
	var errs []error
	if origErr != nil {
		errs = append(errs, origErr)
	}
	return newBaseError(code, message, errs)
}
1367486
func New(msg string, args ...interface{}) *Error {
	return &Error{
		msg:   fmt.Sprintf(msg, args...),
		stack: debug.Stack(),
		level: 0,
	}
}
1047462
func New(logger log.Logger) func(http.Handler) http.Handler {
	return func(h http.Handler) http.Handler {
		return &Logger{
			logger: logger,
			h:      h,
		}
	}
}
1107473
func Newf(cause error, format string, args ...interface{}) Error {
	return makeErrorf(UnknownErrorError, cause, format, args...)
}
926578
func New(message string, keyValues ...interface{}) error {
	len := len(keyValues)
	if len == 0 {
		return errors.New(message)
	}
	buffer := bytes.NewBuffer(nil)
	if message != "" {
		_, _ = buffer.WriteString(message)
		_ = buffer.WriteByte(' ')
	}
	if len%2 != 0 {
		keyValues = append(keyValues, "MISSING")
		len++
	}
	for i := 0; i < len; i += 2 {
		if i != 0 {
			_ = buffer.WriteByte(' ')
		}
		_, _ = buffer.WriteString(fmt.Sprintf("%v", keyValues[i]))
		_ = buffer.WriteByte('=')
		_, _ = buffer.WriteString(fmt.Sprintf("%v", keyValues[i+1]))
	}
	return errors.New(buffer.String())
}
24095
func New(s interface{}) *Struct {
	return &Struct{
		raw:     s,
		value:   strctVal(s),
		TagName: DefaultTagName,
	}
}