Map Commands instead of using them as a slice

The most obvious use case is when one wants to make sure as fast
as possible that a command is a valid Dockerfile command.

Signed-off-by: kargakis <kargakis@users.noreply.github.com>
Upstream-commit: 6ecf23861ec7036aa4210fe6d3b7dbfaaedbd6d0
Component: engine
This commit is contained in:
kargakis
2015-02-20 15:56:21 +01:00
parent 7b25cb1708
commit 314f2be995
2 changed files with 16 additions and 16 deletions
@@ -4836,7 +4836,7 @@ func TestBuildMissingArgs(t *testing.T) {
defer deleteAllContainers()
for _, cmd := range command.Commands {
for cmd := range command.Commands {
cmd = strings.ToUpper(cmd)
if _, ok := skipCmds[cmd]; ok {
continue