This commit is contained in:
Henrique Dias committed 2016-06-27 18:57:54 +01:00
1 parent 1c55147faa
commit 429b67f661
13 files changed
+568 -215

No files matched your search

+10
View File
@@ -35,3 +35,13 @@ func Dict(values ...interface{}) (map[string]interface{}, error) {
return dict, nil
}
// StringInSlice checks if a slice contains a string
func StringInSlice(a string, list []string) (bool, int) {
for i, b := range list {
if b == a {
return true, i
}
}
return false, 0
}