lint, network: remove appendCombine error
By making use of variadic input in the append function, we can remove
the `appendCombine` lint error spotted by `gocritic`.
This flagged the following error:
```
pkg/network/domainspec/generators.go:203:2: appendCombine: can combine chain of 2 appends into one (gocritic)
b.domain.Spec.QEMUCmd.QEMUArg = append(b.domain.Spec.QEMUCmd.QEMUArg, api.Arg{Value: "-device"})
```
@@ -200,9 +200,11 @@ func (b *SlirpLibvirtSpecGenerator) Generate() error {
qemuArg += fmt.Sprintf(",mac=%s", b.vmiSpecIface.MacAddress)
}
// Add interface configuration to qemuArgs
- b.domain.Spec.QEMUCmd.QEMUArg = append(b.domain.Spec.QEMUCmd.QEMUArg, api.Arg{Value: "-device"})
- b.domain.Spec.QEMUCmd.QEMUArg = append(b.domain.Spec.QEMUCmd.QEMUArg, api.Arg{Value: qemuArg})
-
+ b.domain.Spec.QEMUCmd.QEMUArg = append(
+ b.domain.Spec.QEMUCmd.QEMUArg,
+ api.Arg{Value: "-device"},
+ api.Arg{Value: qemuArg},
+ )
return nil
}
