github.com/pavlo67/common@v0.5.3/common/errors/std.go (about)

     1  package errors
     2  
     3  import (
     4  	"errors"
     5  	"fmt"
     6  )
     7  
     8  func Errorf(format string, args ...interface{}) error {
     9  	return fmt.Errorf(format, args...)
    10  }
    11  
    12  func New(text string) error {
    13  	return errors.New(text)
    14  }
    15  
    16  // DEPRECATED
    17  func Wrapf(err error, format string, args ...interface{}) error {
    18  	return CommonError(err, fmt.Sprintf(format, args...))
    19  }
    20  
    21  // DEPRECATED
    22  func Wrap(err error, msg string) error {
    23  	return CommonError(err, msg)
    24  }