1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

refactor: include generics based utility lib and refactor some parts accordingly [ci-skip]

This commit is contained in:
Ferdinand Mütsch
2022-03-20 16:27:21 +01:00
parent a675417ab9
commit 8fc0d78f64
16 changed files with 543 additions and 797 deletions

View File

@ -8,12 +8,3 @@ import (
func Capitalize(s string) string {
return fmt.Sprintf("%s%s", strings.ToUpper(s[:1]), s[1:])
}
func FindString(needle string, haystack []string, defaultVal string) string {
for _, s := range haystack {
if s == needle {
return s
}
}
return defaultVal
}