We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f23fc1c commit e1e1895Copy full SHA for e1e1895
config/config.go
@@ -163,7 +163,7 @@ func ReloadConfig() error {
163
if c.WeightDistributionRange <= 0 {
164
return fmt.Errorf("WeightDistributionRange must be > 0")
165
}
166
- if !isInSlice(c.OutputMode, []string{"auto", "json", "redirect"}) {
+ if !utils.IsInSlice(c.OutputMode, []string{"auto", "json", "redirect"}) {
167
return fmt.Errorf("Config: outputMode can only be set to 'auto', 'json' or 'redirect'")
168
169
if c.Repository == "" {
@@ -266,13 +266,3 @@ func testSentinelsEq(a, b []sentinels) bool {
266
267
return true
268
269
-
270
-//DUPLICATE
271
-func isInSlice(a string, list []string) bool {
272
- for _, b := range list {
273
- if b == a {
274
- return true
275
- }
276
277
- return false
278
-}
0 commit comments