diff --git a/utils_private.go b/utils_private.go index 6f609ae0..8b43453f 100644 --- a/utils_private.go +++ b/utils_private.go @@ -5,6 +5,8 @@ import ( "reflect" "regexp" "runtime" + "unicode" + "unicode/utf8" ) func fileWithLineNum() string { @@ -71,3 +73,24 @@ func convertInterfaceToMap(values interface{}) map[string]interface{} { } return attrs } + +func toString(a interface{}) string { + return fmt.Sprintf("%v", a) +} + +func strInSlice(a string, list []string) bool { + for _, b := range list { + if b == a { + return true + } + } + return false +} + +func upFL(s string) string { + if s == "" { + return "" + } + r, n := utf8.DecodeRuneInString(s) + return string(unicode.ToUpper(r)) + s[n:] +}