mail queue

This commit is contained in:
Aine
2022-11-14 20:02:13 +02:00
parent ce1599d8a3
commit eb07bc1ac7
10 changed files with 302 additions and 74 deletions

View File

@@ -59,6 +59,25 @@ func SanitizeBoolString(str string) string {
return strconv.FormatBool(Bool(str))
}
// Int converts string to integer
func Int(str string) int {
if str == "" {
return 0
}
i, err := strconv.Atoi(str)
if err != nil {
return 0
}
return i
}
// SanitizeBoolString converts string to integer and back to string
func SanitizeIntString(str string) string {
return strconv.Itoa(Int(str))
}
// StringSlice converts comma-separated string to slice
func StringSlice(str string) []string {
if str == "" {