update
This commit is contained in:
1 parent
1c55147faa
commit
429b67f661
13 files changed
+568
-215
No files matched your search
@@ -27,12 +27,3 @@ func Run(c *config.Config.Config, force bool) {
|
||||
log.Panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func stringInSlice(a string, list []string) (bool, int) {
|
||||
for i, b := range list {
|
||||
if b == a {
|
||||
return true, i
|
||||
}
|
||||
}
|
||||
return false, 0
|
||||
}
|
||||
@@ -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