package utils import ( uuid "github.com/satori/go.uuid" "strings" ) func AllBlank(str ...string) bool { for _, s := range str { if !IsStringEmpty(s) { return false } } return true } func HasBlank(str ...string) bool { for _, s := range str { if strings.Trim(s, " ") == "" { return true } } return false } func HasText(str ...string) bool { for _, s := range str { if strings.Trim(s, " ") != "" { return true } } return false } func IsStringEmpty(s string) bool { return strings.Trim(s, " ") == "" } func IsStringNotEmpty(s string) bool { return strings.Trim(s, " ") != "" } func GetUUID() string { return uuid.NewV4().String() } func SimpleUUID() string { return strings.ReplaceAll(GetUUID(), "-", "") } func GenerateUpperLetters(length int) []string { var str []string for i := 0; i < length; i++ { str = append(str, string(rune('A'+i))) } return str } func GenerateLowerLetters(length int) []string { var str []string for i := 0; i < length; i++ { str = append(str, string(rune('a'+i))) } return str }