update
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user