summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/create_cli.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-02-14 15:46:18 -0500
committerMatthew Heon <matthew.heon@pm.me>2020-02-14 16:06:20 -0500
commit36a0ed9702bf4e6ef50650404c838a26f13ba879 (patch)
tree316a75c4cc66f02fed91cb40918e6396b314bc54 /cmd/podman/shared/create_cli.go
parent97fdfd0a80b14b83abca3d8e0aa1b5c64ceac79b (diff)
downloadpodman-36a0ed9702bf4e6ef50650404c838a26f13ba879.tar.gz
podman-36a0ed9702bf4e6ef50650404c838a26f13ba879.tar.bz2
podman-36a0ed9702bf4e6ef50650404c838a26f13ba879.zip
Rework label parsing
We attempted to share all logic for parsing labels and environment variables, which on the surface makes lots of sense (both are formatted key=value so parsing logic should be identical) but has begun to fall apart now that we have added additional logic to environment variable handling. Environment variables that are unset, for example, are looked up against environment variables set for the process. We don't want this for labels, so we have to split parsing logic. Fixes #3854 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman/shared/create_cli.go')
-rw-r--r--cmd/podman/shared/create_cli.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/cmd/podman/shared/create_cli.go b/cmd/podman/shared/create_cli.go
index 00b83906d..10e27350b 100644
--- a/cmd/podman/shared/create_cli.go
+++ b/cmd/podman/shared/create_cli.go
@@ -4,7 +4,6 @@ import (
"fmt"
"strings"
- "github.com/containers/libpod/cmd/podman/shared/parse"
"github.com/containers/libpod/pkg/cgroups"
cc "github.com/containers/libpod/pkg/spec"
"github.com/containers/libpod/pkg/sysinfo"
@@ -12,16 +11,6 @@ import (
"github.com/sirupsen/logrus"
)
-// GetAllLabels ...
-func GetAllLabels(labelFile, inputLabels []string) (map[string]string, error) {
- labels := make(map[string]string)
- labelErr := parse.ReadKVStrings(labels, labelFile, inputLabels)
- if labelErr != nil {
- return labels, errors.Wrapf(labelErr, "unable to process labels from --label and label-file")
- }
- return labels, nil
-}
-
// validateSysctl validates a sysctl and returns it.
func validateSysctl(strSlice []string) (map[string]string, error) {
sysctl := make(map[string]string)