// New makes a new error type. It takes a format string.
6369
func (e *ErrorClass) New(format string, args ...interface{}) error {
	return e.wrap(fmt.Errorf(format, args...), nil, nil)
}
875118
func NewErrorf(code int, f string, args ...interface{}) error {
	return &Error{
		code:  code,
		error: fmt.Errorf(f, args...),
	}
}
878944
func New() string {
	var id [8 + 12]byte
	mu.Lock()
	timeMs := time.Now().UTC().UnixNano() / 1e6
	if timeMs == lastPushTimeMs {
		// increment lastRandChars
		for i := 0; i < 12; i++ {
			lastRandChars[i]++
			if lastRandChars[i] < 64 {
				break
			}
			// increment the next byte
			lastRandChars[i] = 0
		}
	} else {
		genRandPart()
	}
	lastPushTimeMs = timeMs
	// put random as the second part
	for i := 0; i < 12; i++ {
		id[19-i] = pushChars[lastRandChars[i]]
	}
	mu.Unlock()

	// put current time at the beginning
	for i := 7; i >= 0; i-- {
		n := int(timeMs % 64)
		id[i] = pushChars[n]
		timeMs = timeMs / 64
	}
	return string(id[:])
}
612887
func newError(message string, err error) *Error {
	return &Error{
		Message:      message,
		DetailsError: err,
	}
}
827708
func newError(err error, msg string) *Error {
	return &Error{
		Message: msg,
		Err:     err,
	}
}
578683
func New() *Type {
	return &Type{
		dirty:      set{},
		processing: set{},
		cond:       sync.NewCond(&sync.Mutex{}),
	}
}
471125
func New(sendErrorCallback func(ehttp.ResponseWriter, *http.Request, error), errorContentType string, recoverPanic bool, logger *log.Logger) *Router {
	return &Router{
		Router:       httprouter.New(),
		mux:          ehttp.NewServeMux(sendErrorCallback, errorContentType, recoverPanic, logger),
		recoverPanic: recoverPanic,
	}
}
997054
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
	return &Client{transport: transport, formats: formats}
}
913215
func New(err error) backend.B {
	if err == nil {
		panic("the error must not be nil")
	}
	return erroringImpl{err}
}
1268779
func NewError(format string, args ...interface{}) Error {
	err := FmtError{format, args}
	return newCmnError(err)
}
605678
func New(id, detail string, code int32) error {
	return &Error{
		Id:     id,
		Code:   code,
		Detail: detail,
		Status: http.StatusText(int(code)),
	}
}
462973
func New(host string, transport *http.Transport) types.APIClient {
	return &client{
		Client: http.Client{
			Transport: transport,
		},
		host: host,
	}
}
528535
func New(msg string, a ...interface{}) Error {
	msg = fmt.Sprintf(msg, a...)
	return Error{
		error: errors.New(msg),
	}
}
478592
func New(m string, a ...interface{}) error {
	return errors.Wrap(fmt.Errorf(m, a...), 1)
}
1343018
func new(err error, msg string) *baseError {
	stack := make([]uintptr, 200)
	stackLength := runtime.Callers(3, stack)
	return &baseError{
		msg:   msg,
		stack: stack[:stackLength],
		inner: err,
	}
}
1367486
func New(msg string, args ...interface{}) *Error {
	return &Error{
		msg:   fmt.Sprintf(msg, args...),
		stack: debug.Stack(),
		level: 0,
	}
}
321899
func New(errType ErrorType, msg string, args ...interface{}) error {
	return &BoulderError{
		Type:   errType,
		Detail: fmt.Sprintf(msg, args...),
	}
}