Retry checking refactored using util function.

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

No files matched your search

+12 -2
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