diff options
Diffstat (limited to 'libpod/util.go')
-rw-r--r-- | libpod/util.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libpod/util.go b/libpod/util.go index 1a033a940..0c6700fbf 100644 --- a/libpod/util.go +++ b/libpod/util.go @@ -4,13 +4,14 @@ import ( "fmt" "os" "path/filepath" + "strconv" "strings" "time" "github.com/containers/image/signature" "github.com/containers/image/types" + spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" - "strconv" ) // Runtime API constants @@ -96,3 +97,13 @@ func RemoveScientificNotationFromFloat(x float64) (float64, error) { } return result, nil } + +// MountExists returns true if dest exists in the list of mounts +func MountExists(specMounts []spec.Mount, dest string) bool { + for _, m := range specMounts { + if m.Destination == dest { + return true + } + } + return false +} |