summaryrefslogtreecommitdiff
path: root/libpod/util.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-07-03 15:37:17 -0500
committerbaude <bbaude@redhat.com>2019-07-08 09:18:11 -0500
commit1d36501f961889f554daf3c696fe95443ef211b6 (patch)
tree4a8d7aa79f46a0096ad7952f1390d6909a9d894b /libpod/util.go
parentf7407f2eb512e1407f8281009eb829f37405119b (diff)
downloadpodman-1d36501f961889f554daf3c696fe95443ef211b6.tar.gz
podman-1d36501f961889f554daf3c696fe95443ef211b6.tar.bz2
podman-1d36501f961889f554daf3c696fe95443ef211b6.zip
code cleanup
clean up code identified as problematic by golands inspection Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/util.go')
-rw-r--r--libpod/util.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/libpod/util.go b/libpod/util.go
index b0c25074b..b60575264 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -9,8 +9,6 @@ import (
"strings"
"time"
- "github.com/containers/image/signature"
- "github.com/containers/image/types"
"github.com/containers/libpod/libpod/define"
"github.com/fsnotify/fsnotify"
spec "github.com/opencontainers/runtime-spec/specs-go"
@@ -32,24 +30,6 @@ func FuncTimer(funcName string) {
fmt.Printf("%s executed in %d ms\n", funcName, elapsed)
}
-// CopyStringStringMap deep copies a map[string]string and returns the result
-func CopyStringStringMap(m map[string]string) map[string]string {
- n := map[string]string{}
- for k, v := range m {
- n[k] = v
- }
- return n
-}
-
-// GetPolicyContext creates a signature policy context for the given signature policy path
-func GetPolicyContext(path string) (*signature.PolicyContext, error) {
- policy, err := signature.DefaultPolicy(&types.SystemContext{SignaturePolicyPath: path})
- if err != nil {
- return nil, err
- }
- return signature.NewPolicyContext(policy)
-}
-
// RemoveScientificNotationFromFloat returns a float without any
// scientific notation if the number has any.
// golang does not handle conversion of float64s that have scientific