better append

This commit is contained in:
Joel Elkins 2023-12-08 18:17:05 -06:00
parent 93c5060fbf
commit 1239114bc1
No known key found for this signature in database
GPG Key ID: 133589DC38921AE2

View File

@ -192,14 +192,10 @@ func (c *Container) CreateCommands() cmd.Set {
ips = append(ips, c.Networks[i].IPv6Address)
}
if c.Networks[i].IPv4Addresses != nil {
for _, ip := range c.Networks[i].IPv4Addresses {
ips = append(ips, ip)
}
ips = append(ips, c.Networks[i].IPv4Addresses...)
}
if c.Networks[i].IPv6Addresses != nil {
for _, ip := range c.Networks[i].IPv6Addresses {
ips = append(ips, ip)
}
ips = append(ips, c.Networks[i].IPv6Addresses...)
}
nets[c.Networks[i].Name] = types.PerNetworkOptions{
StaticIPs: ips,