Documentation ¶
Index ¶
- func Cast(i interface{}) (string, error)
- func CastOrEmpty(i interface{}) string
- func CastToBool(i interface{}) (bool, error)
- func ContainsInSlice(s []string, str string) bool
- func ConvertToStringArray(arr []interface{}) ([]string, error)
- func MapToSlice(set map[string]struct{}) []string
- func Matches(actual []string, required []string) bool
- func NewNullString(s string) sql.NullString
- func PrefixStrings(in []string, prefix string) []string
- func Ptr(s string) *string
- func PtrStrToStr(s *string) string
- func SliceToMap(in []string) map[string]struct{}
- func StringifyJSONRawMessage(rawMessage json.RawMessage) *string
- func Title(s string) string
- func Unique(in []string) []string
- func ValueIn(value string, in []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastOrEmpty ¶
func CastOrEmpty(i interface{}) string
CastOrEmpty casts the given value to string and returns the empty string otherwise
func CastToBool ¶
CastToBool casts the given value to string and then parsers it to a bool value
func ContainsInSlice ¶
ContainsInSlice checks if a string value is present in a given slice
func ConvertToStringArray ¶
ConvertToStringArray converts array of interfaces to string array
func PrefixStrings ¶
PrefixStrings missing godoc
func StringifyJSONRawMessage ¶
func StringifyJSONRawMessage(rawMessage json.RawMessage) *string
StringifyJSONRawMessage if the rawMessage contains value returns it, otherwise return nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.