From dff267fac13f0aef9af60b7e31663e636ab1999f Mon Sep 17 00:00:00 2001 From: Mohammed JBILOU <95973236+Molaryy@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:58:04 +0200 Subject: [PATCH] feat: added container creation in go --- create-container/go.mod | 3 +++ create-container/main.go | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 create-container/go.mod create mode 100644 create-container/main.go diff --git a/create-container/go.mod b/create-container/go.mod new file mode 100644 index 0000000..addc03a --- /dev/null +++ b/create-container/go.mod @@ -0,0 +1,3 @@ +module c-container + +go 1.21.0 diff --git a/create-container/main.go b/create-container/main.go new file mode 100644 index 0000000..7152f96 --- /dev/null +++ b/create-container/main.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "os" +) + +func runContainer() { + fmt.Println("Sup") +} + +func main() { + var cmds [1] []string = ["tes"] + + + if len(os.Args) < 2 { + panic("Provide at leas 1 argument") + } + fmt.Println(len(os.Args)) + switch os.Args[1] { + case "run": + runContainer() + default: + panic("Provide at leas 1 argument") + } +}