diff options
author | Sebastiaan van Stijn <thaJeztah@users.noreply.github.com> | 2016-10-13 18:44:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 18:44:30 -0700 |
commit | 21a79b503a5c1331d0c000d26179a55fc235b021 (patch) | |
tree | 10c9bdc1004752cdb15005069cbc1cfc632ef797 /runconfig/opts | |
parent | dd383898cdcbcef7bd48bc0115cc9a739cf610f3 (diff) | |
parent | a37027f6bdcb2f035fcccd99c6c6064934623a04 (diff) | |
download | docker-21a79b503a5c1331d0c000d26179a55fc235b021.tar.gz |
Merge pull request #27366 from morelena/use_contains
all: use strings.Contains instead Index
Diffstat (limited to 'runconfig/opts')
-rw-r--r-- | runconfig/opts/parse.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runconfig/opts/parse.go b/runconfig/opts/parse.go index b7097c3ec8..5b99ce6736 100644 --- a/runconfig/opts/parse.go +++ b/runconfig/opts/parse.go @@ -697,7 +697,7 @@ func parseSecurityOpts(securityOpts []string) ([]string, error) { for key, opt := range securityOpts { con := strings.SplitN(opt, "=", 2) if len(con) == 1 && con[0] != "no-new-privileges" { - if strings.Index(opt, ":") != -1 { + if strings.Contains(opt, ":") { con = strings.SplitN(opt, ":", 2) } else { return securityOpts, fmt.Errorf("Invalid --security-opt: %q", opt) |