diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-09 16:47:30 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-10 05:49:41 -0400 |
commit | 4bb43b898d72cb938d317055e4ade2771cfc9c54 (patch) | |
tree | 4d3f87d922da20d575615cdd50f19b61d9fa4bc1 /pkg/specgen | |
parent | fbe09d78e91c9ac5cadc8b00a67c7d7f89d64868 (diff) | |
download | podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.tar.gz podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.tar.bz2 podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.zip |
Fixup issues found by golint
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r-- | pkg/specgen/container_validate.go | 2 | ||||
-rw-r--r-- | pkg/specgen/generate/container_create.go | 2 | ||||
-rw-r--r-- | pkg/specgen/generate/namespaces.go | 4 | ||||
-rw-r--r-- | pkg/specgen/pod_validate.go | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go index 2c5891f9a..45179343b 100644 --- a/pkg/specgen/container_validate.go +++ b/pkg/specgen/container_validate.go @@ -10,7 +10,7 @@ import ( var ( // ErrInvalidSpecConfig describes an error that the given SpecGenerator is invalid - ErrInvalidSpecConfig error = errors.New("invalid configuration") + ErrInvalidSpecConfig = errors.New("invalid configuration") // SystemDValues describes the only values that SystemD can be SystemDValues = []string{"true", "false", "always"} // ImageVolumeModeValues describes the only values that ImageVolumeMode can be diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index 74ae848af..33075b543 100644 --- a/pkg/specgen/generate/container_create.go +++ b/pkg/specgen/generate/container_create.go @@ -230,7 +230,7 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen. options = append(options, libpod.WithPrivileged(s.Privileged)) // Get namespace related options - namespaceOptions, err := GenerateNamespaceOptions(ctx, s, rt, pod, img) + namespaceOptions, err := namespaceOptions(ctx, s, rt, pod, img) if err != nil { return nil, err } diff --git a/pkg/specgen/generate/namespaces.go b/pkg/specgen/generate/namespaces.go index ffa96a5cf..e67afe1bf 100644 --- a/pkg/specgen/generate/namespaces.go +++ b/pkg/specgen/generate/namespaces.go @@ -72,13 +72,13 @@ func GetDefaultNamespaceMode(nsType string, cfg *config.Config, pod *libpod.Pod) return toReturn, errors.Wrapf(define.ErrInvalidArg, "invalid namespace type %q passed", nsType) } -// GenerateNamespaceOptions generates container creation options for all +// namespaceOptions generates container creation options for all // namespaces in a SpecGenerator. // Pod is the pod the container will join. May be nil is the container is not // joining a pod. // TODO: Consider grouping options that are not directly attached to a namespace // elsewhere. -func GenerateNamespaceOptions(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, pod *libpod.Pod, img *image.Image) ([]libpod.CtrCreateOption, error) { +func namespaceOptions(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, pod *libpod.Pod, img *image.Image) ([]libpod.CtrCreateOption, error) { toReturn := []libpod.CtrCreateOption{} // If pod is not nil, get infra container. diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go index 640447e71..2d57cdb91 100644 --- a/pkg/specgen/pod_validate.go +++ b/pkg/specgen/pod_validate.go @@ -7,7 +7,7 @@ import ( var ( // ErrInvalidPodSpecConfig describes an error given when the podspecgenerator is invalid - ErrInvalidPodSpecConfig error = errors.New("invalid pod spec") + ErrInvalidPodSpecConfig = errors.New("invalid pod spec") // containerConfig has the default configurations defined in containers.conf containerConfig = util.DefaultContainerConfig() ) |