diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-23 10:21:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 10:21:41 +0200 |
commit | 26749204d5fcd333706bef187b75cd3c6b39b835 (patch) | |
tree | 1fe72a798eef9d803e7714ea877304f1568171bd /libpod/container_inspect.go | |
parent | a12a2312ac5c6c485eaa1d45e4b7e29d6cc4a9ff (diff) | |
parent | 0c3038d4b5479e475217f2990107f376024d5726 (diff) | |
download | podman-26749204d5fcd333706bef187b75cd3c6b39b835.tar.gz podman-26749204d5fcd333706bef187b75cd3c6b39b835.tar.bz2 podman-26749204d5fcd333706bef187b75cd3c6b39b835.zip |
Merge pull request #3621 from baude/golangcilint4
golangci-lint phase 4
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r-- | libpod/container_inspect.go | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index c4d2af66e..aee8c4657 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -963,24 +963,16 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named } hostConfig.DnsOptions = make([]string, 0, len(c.config.DNSOption)) - for _, opt := range c.config.DNSOption { - hostConfig.DnsOptions = append(hostConfig.DnsOptions, opt) - } + hostConfig.DnsOptions = append(hostConfig.DnsOptions, c.config.DNSOption...) hostConfig.DnsSearch = make([]string, 0, len(c.config.DNSSearch)) - for _, search := range c.config.DNSSearch { - hostConfig.DnsSearch = append(hostConfig.DnsSearch, search) - } + hostConfig.DnsSearch = append(hostConfig.DnsSearch, c.config.DNSSearch...) hostConfig.ExtraHosts = make([]string, 0, len(c.config.HostAdd)) - for _, host := range c.config.HostAdd { - hostConfig.ExtraHosts = append(hostConfig.ExtraHosts, host) - } + hostConfig.ExtraHosts = append(hostConfig.ExtraHosts, c.config.HostAdd...) hostConfig.GroupAdd = make([]string, 0, len(c.config.Groups)) - for _, group := range c.config.Groups { - hostConfig.GroupAdd = append(hostConfig.GroupAdd, group) - } + hostConfig.GroupAdd = append(hostConfig.GroupAdd, c.config.Groups...) hostConfig.SecurityOpt = []string{} if ctrSpec.Process != nil { |