aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-07-22 13:08:06 -0500
committerbaude <bbaude@redhat.com>2019-07-22 15:44:04 -0500
commit0c3038d4b5479e475217f2990107f376024d5726 (patch)
treefa0936d65d105c8943f40366b0bcb3685d8c0f12 /libpod
parentab7b47ca60da11f9e24688cfe2ae3d00eb123471 (diff)
downloadpodman-0c3038d4b5479e475217f2990107f376024d5726.tar.gz
podman-0c3038d4b5479e475217f2990107f376024d5726.tar.bz2
podman-0c3038d4b5479e475217f2990107f376024d5726.zip
golangci-lint phase 4
clean up some final linter issues and add a make target for golangci-lint. in addition, begin running the tests are part of the gating tasks in cirrus ci. we cannot fully shift over to the new linter until we fix the image on the openshift side. for short term, we will use both Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_inspect.go16
-rw-r--r--libpod/image/image.go15
2 files changed, 8 insertions, 23 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 {
diff --git a/libpod/image/image.go b/libpod/image/image.go
index a057bc720..db50e3dbd 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -38,26 +38,19 @@ import (
"github.com/sirupsen/logrus"
)
-// imageConversions is used to cache image "cast" types
-type imageConversions struct {
- imgRef types.Image
- storeRef types.ImageReference
-}
-
// Image is the primary struct for dealing with images
// It is still very much a work in progress
type Image struct {
// Adding these two structs for now but will cull when we near
// completion of this library.
- imageConversions
+ imgRef types.Image
+ storeRef types.ImageReference
inspect.ImageData
inspect.ImageResult
- inspectInfo *types.ImageInspectInfo
- InputName string
- //runtime *libpod.Runtime
+ inspectInfo *types.ImageInspectInfo
+ InputName string
image *storage.Image
imageruntime *Runtime
- repotagsMap map[string][]string
}
// Runtime contains the store