Commit 93d83f9
authored
refactor: replace empty slice literal with var declaration
This PR streamlines slice declarations by replacing an empty slice literal with a var declaration. The change removes unnecessary allocation and embraces Go’s idiomatic use of nil slices for empty collections.
- Empty slice literal used to declare a variable: The code originally declared an empty slice with [][]string{}, which allocates a zero-length slice. By switching to `var extras [][]string`, we declare a nil slice that behaves identically in append scenarios but avoids an extra allocation and better communicates intent.
> This Autofix was generated by AI. Please review the change before merging.1 parent da43d0b commit 93d83f9
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments