diff options
author | baude <bbaude@redhat.com> | 2019-07-10 13:14:17 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-07-11 09:13:06 -0500 |
commit | a78c885397ad2938b9b21438bcfa8a00dd1eb03f (patch) | |
tree | d02607bb19379942b5cac3aa50e1c7428d68e8b9 /libpod/container.go | |
parent | e2e8477f83f717d6a92badd317ae909cf185d04e (diff) | |
download | podman-a78c885397ad2938b9b21438bcfa8a00dd1eb03f.tar.gz podman-a78c885397ad2938b9b21438bcfa8a00dd1eb03f.tar.bz2 podman-a78c885397ad2938b9b21438bcfa8a00dd1eb03f.zip |
golangci-lint pass number 2
clean up and prepare to migrate to the golangci-linter
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libpod/container.go b/libpod/container.go index a9b512de9..b71c0b2be 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -639,10 +639,7 @@ func (c *Container) HostsAdd() []string { // trigger some OCI hooks. func (c *Container) UserVolumes() []string { volumes := make([]string, 0, len(c.config.UserVolumes)) - for _, vol := range c.config.UserVolumes { - volumes = append(volumes, vol) - } - + volumes = append(volumes, c.config.UserVolumes...) return volumes } @@ -650,10 +647,7 @@ func (c *Container) UserVolumes() []string { // This is not added to the spec, but is instead used during image commit. func (c *Container) Entrypoint() []string { entrypoint := make([]string, 0, len(c.config.Entrypoint)) - for _, str := range c.config.Entrypoint { - entrypoint = append(entrypoint, str) - } - + entrypoint = append(entrypoint, c.config.Entrypoint...) return entrypoint } @@ -661,10 +655,7 @@ func (c *Container) Entrypoint() []string { // This is not added to the spec, but is instead used during image commit func (c *Container) Command() []string { command := make([]string, 0, len(c.config.Command)) - for _, str := range c.config.Command { - command = append(command, str) - } - + command = append(command, c.config.Command...) return command } |