Skip to content

Commit d4bcfb9

Browse files
authored
[chore][internal/testutil] run make modernize (#14158)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#14153) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
1 parent fa20a0c commit d4bcfb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/testutil/testutil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ func createExclusionsList(tb testing.TB, exclusionsText string) []portpair {
113113
require.Len(tb, parts, 3)
114114
portsText := strings.Split(parts[2], "*")
115115
require.Greater(tb, len(portsText), 1) // original text may have a suffix like " - Administered port exclusions."
116-
lines := strings.Split(portsText[0], "\n")
117-
for _, line := range lines {
116+
lines := strings.SplitSeq(portsText[0], "\n")
117+
for line := range lines {
118118
if strings.TrimSpace(line) != "" {
119119
entries := strings.Fields(strings.TrimSpace(line))
120120
require.Len(tb, entries, 2)

0 commit comments

Comments
 (0)