all: rename variables with lowercase-l/uppercase-I

See http://go/no-ell

Signed-off-by: Alex Chan <alexc@tailscale.com>

Updates #cleanup

Change-Id: I8c976b51ce7a60f06315048b1920516129cc1d5d
This commit is contained in:
Alex Chan
2025-11-17 18:13:44 +00:00
committed by Alex Chan
parent 9048ea25db
commit c2e474e729
81 changed files with 923 additions and 923 deletions

View File

@@ -870,7 +870,7 @@ func (o *fakeOS) run(args ...string) error {
rest = family + " " + strings.Join(args[3:], " ")
}
var l *[]string
var ls *[]string
switch args[1] {
case "link":
got := strings.Join(args[2:], " ")
@@ -884,31 +884,31 @@ func (o *fakeOS) run(args ...string) error {
}
return nil
case "addr":
l = &o.ips
ls = &o.ips
case "route":
l = &o.routes
ls = &o.routes
case "rule":
l = &o.rules
ls = &o.rules
default:
return unexpected()
}
switch args[2] {
case "add":
for _, el := range *l {
for _, el := range *ls {
if el == rest {
o.t.Errorf("can't add %q, already present", rest)
return errors.New("already exists")
}
}
*l = append(*l, rest)
sort.Strings(*l)
*ls = append(*ls, rest)
sort.Strings(*ls)
case "del":
found := false
for i, el := range *l {
for i, el := range *ls {
if el == rest {
found = true
*l = append((*l)[:i], (*l)[i+1:]...)
*ls = append((*ls)[:i], (*ls)[i+1:]...)
break
}
}