gitlab.com/evatix-go/core@v1.3.55/errcore/RefToError.go (about) 1 package errcore 2 3 import ( 4 "errors" 5 "fmt" 6 7 "gitlab.com/evatix-go/core/constants" 8 ) 9 10 func RefToError(reference interface{}) error { 11 if reference == nil { 12 return nil 13 } 14 15 return errors.New(fmt.Sprintf( 16 constants.ReferenceWrapFormat, 17 reference), 18 ) 19 }