gitlab.com/evatix-go/core@v1.3.55/errcore/getReferenceMessage.go (about) 1 package errcore 2 3 import "fmt" 4 5 func getReferenceMessage( 6 reference interface{}, 7 ) string { 8 if reference == nil { 9 return "" 10 } 11 12 currentString, isString := reference.(string) 13 if isString && currentString == "" { 14 return "" 15 } 16 17 return fmt.Sprintf( 18 ReferenceFormat, 19 reference) 20 }