gitlab.com/evatix-go/core@v1.3.55/internal/strutilinternal/AnyToStringUsing.go (about) 1 package strutilinternal 2 3 import ( 4 "fmt" 5 6 "gitlab.com/evatix-go/core/constants" 7 ) 8 9 func AnyToStringUsing( 10 isIncludeFields bool, 11 any interface{}, 12 ) string { 13 if any == nil { 14 return "" 15 } 16 17 if isIncludeFields { 18 return fmt.Sprintf( 19 constants.SprintPropertyNameValueFormat, 20 any) 21 } 22 23 return fmt.Sprintf( 24 constants.SprintValueFormat, 25 any) 26 }