// New creates and returns an Error with a pre-defined user output message
// all methods below that doesn't accept a pointer receiver because actualy they are not changing the original message
322838
func New(errMsg string) *Error {
	if NewLine {
		errMsg += "\n"
	}
	return &Error{message: Prefix + errMsg}
}
341506
func New(w io.Writer, bufferSize int64) io.WriteCloser {
	buf, _ := circbuf.NewBuffer(bufferSize)
	c := &circbufWriter{
		buf:     buf,
		wr:      w,
		flushCh: make(chan struct{}, 1),
	}
	go c.flushLoop()
	return c
}
1013113
func New() (*Permissions, error) {
	state, err := NewUserStateSimple()
	if err != nil {
		return nil, err
	}
	return NewPermissions(state), nil
}
1311858
func New(err ...bool) *Message {
	m := &Message{}
	if len(err) > 0 {
		m.Err = err[0]
	}
	return m
}
1174990
func New() *Logger {
	defaultOutputMutex.RLock()
	defer defaultOutputMutex.RUnlock()

	logger := &Logger{
		Fields:  make(map[string]interface{}),
		outputs: make([]*loggerOutputWrapper, len(defaultOutputs)),
	}
	copy(logger.outputs, defaultOutputs)

	return logger
}
593916
func New(na ...string) (log Logger) {
	s := strings.Join(na, DefaultSepperator)
	return Logger(s)
}
47335
func New(errs ...error) error {
	errors := Errors{}
	for _, err := range errs {
		if err != nil {
			errors = append(errors, err)
		}
	}

	if len(errors) == 0 {
		return nil
	}

	if len(errors) == 1 {
		return errors[0]
	}

	return errors
}
960391
func New(ctx context.Context, err error, skip int) *Error {
	if e, ok := err.(*Error); ok {
		return e
	}
	return new(err, skip+1).WithContext(ctx)
}
786165
func (ec ErrClass) New(code ErrCode, message string) *Error {
	return &Error{
		class:   ec,
		code:    code,
		message: message,
	}
}
417409
func New(errMsg string) Error {
	uidv4, _ := uuid.NewV4() // skip error.
	return Error{
		ID:      uidv4.String(),
		Message: Prefix + errMsg,
	}
}
478592
func New(m string, a ...interface{}) error {
	return errors.Wrap(fmt.Errorf(m, a...), 1)
}
1126434
func (opt Options) New(c context.Context) output.Output {
	o := dirOutput{
		Context: c,
		Options: &opt,
		streams: map[types.StreamPath]*stream{},
	}
	return &o
}
1264543
func New(text string) error {
	if AddStack {
		text += "\n" + string(debug.Stack())
	}
	return &errorString{text}
}
527384
func New(session *session.Session) *Lambda {
	fmt.Printf("\n")
	return &Lambda{
		Lambda: lambda.New(session),
	}
}
988087
func New(code vtrpcpb.Code, message string) error {
	return &fundamental{
		msg:   message,
		code:  code,
		stack: callers(),
	}
}
833204
func New() *Logger {
	return &Logger{
		Level:  InfoLevel,
		Logger: log.New(os.Stderr, "", 0),
	}
}
382175
func New(root string, options ...func(*LinuxFactory) error) (Factory, error) {
	if root != "" {
		if err := os.MkdirAll(root, 0700); err != nil {
			return nil, newGenericError(err, SystemError)
		}
	}
	l := &LinuxFactory{
		Root:      root,
		InitPath:  "/proc/self/exe",
		InitArgs:  []string{os.Args[0], "init"},
		Validator: validate.New(),
		CriuPath:  "criu",
	}
	Cgroupfs(l)
	for _, opt := range options {
		if opt == nil {
			continue
		}
		if err := opt(l); err != nil {
			return nil, err
		}
	}
	return l, nil
}