mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-24 21:46:07 +00:00
refactor: modernize Go with strings.SplitSeq and maps.Copy
Replace strings.Split loops with strings.SplitSeq iterators in the CSV parsers (reality_scan and the scale-test helpers) and swap a manual map copy for maps.Copy in the MTProto traffic collector. No behavior change; these are the fixes the modernize analyzer reports.
This commit is contained in:
@@ -54,7 +54,7 @@ func scaleSubSizes(t *testing.T, def ...int) []int {
|
||||
return def
|
||||
}
|
||||
var out []int
|
||||
for _, part := range strings.Split(raw, ",") {
|
||||
for part := range strings.SplitSeq(raw, ",") {
|
||||
part = strings.TrimSpace(part)
|
||||
if part == "" {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user