diff options
author | Matthew Heon <mheon@redhat.com> | 2020-07-14 09:44:56 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-07-14 13:24:12 -0400 |
commit | fbc1167c4d7861013001d0c2460c6e1c1e1ad66d (patch) | |
tree | 3cc0c3793d440eca2bfb4910d7c1315259a86ca9 /libpod | |
parent | 1fdfd52eeb513c8d6fad11f53baeef97151775a6 (diff) | |
download | podman-fbc1167c4d7861013001d0c2460c6e1c1e1ad66d.tar.gz podman-fbc1167c4d7861013001d0c2460c6e1c1e1ad66d.tar.bz2 podman-fbc1167c4d7861013001d0c2460c6e1c1e1ad66d.zip |
Fix lint
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/pod_api.go | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/libpod/pod_api.go b/libpod/pod_api.go index f889ba789..f2ef81bec 100644 --- a/libpod/pod_api.go +++ b/libpod/pod_api.go @@ -494,33 +494,23 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) { if len(p.config.InfraContainer.DNSServer) > 0 { infraConfig.DNSServer = make([]string, 0, len(p.config.InfraContainer.DNSServer)) - for _, i := range p.config.InfraContainer.DNSServer { - infraConfig.DNSServer = append(infraConfig.DNSServer, i) - } + infraConfig.DNSServer = append(infraConfig.DNSServer, p.config.InfraContainer.DNSServer...) } if len(p.config.InfraContainer.DNSSearch) > 0 { infraConfig.DNSSearch = make([]string, 0, len(p.config.InfraContainer.DNSSearch)) - for _, i := range p.config.InfraContainer.DNSSearch { - infraConfig.DNSSearch = append(infraConfig.DNSSearch, i) - } + infraConfig.DNSSearch = append(infraConfig.DNSSearch, p.config.InfraContainer.DNSSearch...) } if len(p.config.InfraContainer.DNSOption) > 0 { infraConfig.DNSOption = make([]string, 0, len(p.config.InfraContainer.DNSOption)) - for _, i := range p.config.InfraContainer.DNSOption { - infraConfig.DNSOption = append(infraConfig.DNSOption, i) - } + infraConfig.DNSOption = append(infraConfig.DNSOption, p.config.InfraContainer.DNSOption...) } if len(p.config.InfraContainer.HostAdd) > 0 { infraConfig.HostAdd = make([]string, 0, len(p.config.InfraContainer.HostAdd)) - for _, i := range p.config.InfraContainer.HostAdd { - infraConfig.HostAdd = append(infraConfig.HostAdd, i) - } + infraConfig.HostAdd = append(infraConfig.HostAdd, p.config.InfraContainer.HostAdd...) } if len(p.config.InfraContainer.Networks) > 0 { infraConfig.Networks = make([]string, 0, len(p.config.InfraContainer.Networks)) - for _, i := range p.config.InfraContainer.Networks { - infraConfig.Networks = append(infraConfig.Networks, i) - } + infraConfig.Networks = append(infraConfig.Networks, p.config.InfraContainer.Networks...) } infraConfig.PortBindings = makeInspectPortBindings(p.config.InfraContainer.PortBindings) |