summaryrefslogtreecommitdiff
path: root/pkg/spec/storage.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-13 21:03:21 +0100
committerGitHub <noreply@github.com>2020-01-13 21:03:21 +0100
commit796ae87b1a3444557644944ddeb7cb37e303ef83 (patch)
tree192bd260c0b35519fe45ecbc91d7212251d82495 /pkg/spec/storage.go
parentc1d93666d4b175be29a0ba229ee0b94d50765888 (diff)
parent768c476ae3c1dbf37204f5769b43746358af899d (diff)
downloadpodman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.gz
podman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.bz2
podman-796ae87b1a3444557644944ddeb7cb37e303ef83.zip
Merge pull request #4850 from vrothberg/fix-linting
Fix linting
Diffstat (limited to 'pkg/spec/storage.go')
-rw-r--r--pkg/spec/storage.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/spec/storage.go b/pkg/spec/storage.go
index dbdab0030..0e2098c1d 100644
--- a/pkg/spec/storage.go
+++ b/pkg/spec/storage.go
@@ -409,9 +409,10 @@ func getBindMount(args []string) (spec.Mount, error) {
// ro=[true|false]
// rw
// rw=[true|false]
- if len(kv) == 1 {
+ switch len(kv) {
+ case 1:
newMount.Options = append(newMount.Options, kv[0])
- } else if len(kv) == 2 {
+ case 2:
switch strings.ToLower(kv[1]) {
case "true":
newMount.Options = append(newMount.Options, kv[0])
@@ -424,7 +425,7 @@ func getBindMount(args []string) (spec.Mount, error) {
default:
return newMount, errors.Wrapf(optionArgError, "%s must be set to true or false, instead received %q", kv[0], kv[1])
}
- } else {
+ default:
return newMount, errors.Wrapf(optionArgError, "badly formatted option %q", val)
}
case "nosuid", "suid":