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

     1  package errcore
     2  
     3  import (
     4  	"errors"
     5  )
     6  
     7  func ErrorWithRefToError(err error, reference interface{}) error {
     8  	if err == nil {
     9  		return nil
    10  	}
    11  
    12  	return errors.New(ErrorWithRef(err, reference))
    13  }