mirror of
https://github.com/moby/moby.git
synced 2026-08-05 07:30:57 +00:00
modernize: Prefer strings.SplitSeq instead of Split
Avoids extra allocations. Added in Go 1.24. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -157,7 +157,7 @@ func (s *DockerHubPullSuite) TestPullAllTagsFromCentralRegistry(c *testing.T) {
|
||||
|
||||
// Verify that the line for 'dockercore/engine-pull-all-test-fixture:latest' is left unchanged.
|
||||
var latestLine string
|
||||
for _, line := range strings.Split(outImageAllTagCmd, "\n") {
|
||||
for line := range strings.SplitSeq(outImageAllTagCmd, "\n") {
|
||||
if strings.HasPrefix(line, "dockercore/engine-pull-all-test-fixture") && strings.Contains(line, "latest") {
|
||||
latestLine = line
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user