Skip to content

Commit

Permalink
using slices.Contains (#13837)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuiweixie authored Apr 1, 2024
1 parent 9df20e6 commit 0e1c585
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions config/params/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"path"
"path/filepath"
"reflect"
"slices"
"sort"
"strings"
"testing"
Expand Down Expand Up @@ -401,10 +402,5 @@ func assertYamlFieldsMatch(t *testing.T, name string, fields []string, c1, c2 *p
}

func isPlaceholderField(field string) bool {
for _, f := range placeholderFields {
if f == field {
return true
}
}
return false
return slices.Contains(placeholderFields, field)
}

0 comments on commit 0e1c585

Please sign in to comment.