From 2d406b50c432c3f1ec6179af3958847a809dff03 Mon Sep 17 00:00:00 2001 From: Mohammed JBILOU <95973236+Molaryy@users.noreply.github.com> Date: Fri, 20 Oct 2023 00:06:23 +0200 Subject: [PATCH] feat: added array to detect input, create container --- create-container/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/create-container/main.go b/create-container/main.go index 7152f96..5db2fa1 100644 --- a/create-container/main.go +++ b/create-container/main.go @@ -10,15 +10,16 @@ func runContainer() { } func main() { - var cmds [1] []string = ["tes"] + var cmds [1]string + cmds[0] = "run" if len(os.Args) < 2 { panic("Provide at leas 1 argument") } fmt.Println(len(os.Args)) switch os.Args[1] { - case "run": + case cmds[0]: runContainer() default: panic("Provide at leas 1 argument")