1+ // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
2+ //go:build go1.24
3+
14package volume
25
36import (
@@ -166,7 +169,7 @@ func runCreate(ctx context.Context, dockerCli command.Cli, options createOptions
166169 // each topology takes the form segment=value,segment=value
167170 // comma-separated list of equal separated maps
168171 segments := map [string ]string {}
169- for _ , segment := range strings .Split (top , "," ) {
172+ for segment := range strings .SplitSeq (top , "," ) {
170173 // TODO(dperny): validate topology syntax
171174 k , v , _ := strings .Cut (segment , "=" )
172175 segments [k ] = v
@@ -181,7 +184,7 @@ func runCreate(ctx context.Context, dockerCli command.Cli, options createOptions
181184 // each topology takes the form segment=value,segment=value
182185 // comma-separated list of equal separated maps
183186 segments := map [string ]string {}
184- for _ , segment := range strings .Split (top , "," ) {
187+ for segment := range strings .SplitSeq (top , "," ) {
185188 // TODO(dperny): validate topology syntax
186189 k , v , _ := strings .Cut (segment , "=" )
187190 segments [k ] = v
0 commit comments