@@ -84,13 +84,13 @@ func TestRun(t *testing.T) {
8484 assert .Len (t , lines , len (expectedPaths ))
8585
8686 // Convert expected paths to use OS-specific path separators
87- var osExpectedPaths []string
87+ osExpectedPaths := make ( []string , 0 , len ( expectedPaths ))
8888 for _ , path := range expectedPaths {
8989 osExpectedPaths = append (osExpectedPaths , filepath .FromSlash (path ))
9090 }
9191
9292 // Convert actual paths to use OS-specific path separators
93- var osPaths []string
93+ osPaths := make ( []string , 0 , len ( lines ))
9494 for _ , line := range lines {
9595 osPaths = append (osPaths , filepath .FromSlash (strings .TrimSpace (line )))
9696 }
@@ -150,13 +150,13 @@ func TestRun(t *testing.T) {
150150 assert .Len (t , configs , len (expectedPaths ))
151151
152152 // Convert expected paths to use OS-specific path separators
153- var osExpectedPaths []string
153+ osExpectedPaths := make ( []string , 0 , len ( expectedPaths ))
154154 for _ , path := range expectedPaths {
155155 osExpectedPaths = append (osExpectedPaths , filepath .FromSlash (path ))
156156 }
157157
158158 // Extract paths and convert to OS-specific separators
159- var paths []string
159+ paths := make ( []string , 0 , len ( configs ))
160160 for _ , config := range configs {
161161 paths = append (paths , filepath .FromSlash (config .Path ))
162162 }
@@ -224,13 +224,13 @@ func TestRun(t *testing.T) {
224224 assert .Len (t , lines , len (expectedPaths ))
225225
226226 // Convert expected paths to use OS-specific path separators
227- var osExpectedPaths []string
227+ osExpectedPaths := make ( []string , 0 , len ( expectedPaths ))
228228 for _ , path := range expectedPaths {
229229 osExpectedPaths = append (osExpectedPaths , filepath .FromSlash (path ))
230230 }
231231
232232 // Convert actual paths to use OS-specific path separators
233- var osPaths []string
233+ osPaths := make ( []string , 0 , len ( lines ))
234234 for _ , line := range lines {
235235 osPaths = append (osPaths , filepath .FromSlash (strings .TrimSpace (line )))
236236 }
@@ -295,13 +295,13 @@ dependency "unit2" {
295295 assert .Len (t , lines , len (expectedPaths ))
296296
297297 // Convert paths to use OS-specific separators
298- var osPaths []string
298+ osPaths := make ( []string , 0 , len ( lines ))
299299 for _ , line := range lines {
300300 osPaths = append (osPaths , filepath .FromSlash (strings .TrimSpace (line )))
301301 }
302302
303303 // Convert expected paths to use OS-specific separators
304- var osExpectedPaths []string
304+ osExpectedPaths := make ( []string , 0 , len ( expectedPaths ))
305305 for _ , path := range expectedPaths {
306306 osExpectedPaths = append (osExpectedPaths , filepath .FromSlash (path ))
307307 }
@@ -365,13 +365,13 @@ dependency "B" {
365365 assert .Len (t , configs , len (expectedPaths ))
366366
367367 // Extract paths and verify order
368- var paths []string
368+ paths := make ( []string , 0 , len ( configs ))
369369 for _ , config := range configs {
370370 paths = append (paths , filepath .FromSlash (config .Path ))
371371 }
372372
373373 // Convert expected paths to use OS-specific separators
374- var osExpectedPaths []string
374+ osExpectedPaths := make ( []string , 0 , len ( expectedPaths ))
375375 for _ , path := range expectedPaths {
376376 osExpectedPaths = append (osExpectedPaths , filepath .FromSlash (path ))
377377 }
0 commit comments