gitlab.com/evatix-go/core@v1.3.55/errcore/ConcatMessageWithErr.go (about)

     1  package errcore
     2  
     3  import "errors"
     4  
     5  func ConcatMessageWithErr(
     6  	errMessage string,
     7  	err error,
     8  ) error {
     9  	if err == nil {
    10  		return nil
    11  	}
    12  
    13  	return errors.New(errMessage + err.Error())
    14  }