Retry checking refactored using util function.

This commit is contained in:
Musab Gültekin
2021-04-14 09:32:42 +03:00
parent 46c4db6b1a
commit be4d13c0ef
3 changed files with 18 additions and 10 deletions

View File

@ -16,8 +16,18 @@ func DefaultRune(val rune, valDefault rune) rune {
return valDefault
}
// Contains checks whether []string Contains string
func Contains(s []string, e string) bool {
// ContainsString checks whether []string ContainsString string
func ContainsString(s []string, e string) bool {
for _, a := range s {
if a == e {
return true
}
}
return false
}
// ContainsInt checks whether []int contains int
func ContainsInt(s []int, e int) bool {
for _, a := range s {
if a == e {
return true