commit 7bbdcc591d4cf288a87bb8fc03691f38a815521c Author: Lukas Bachschwell Date: Sat Jan 9 16:14:47 2021 +0100 Clean start diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..0937372 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module goselfupdatetest + +go 1.15 diff --git a/main.go b/main.go new file mode 100644 index 0000000..216408f --- /dev/null +++ b/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "os" +) + +var version = "v0.1.0" + +func main() { + if len(os.Args) < 2 { + fmt.Println("provide a command") + os.Exit(1) + } else if os.Args[1] == "upgrade" { + fmt.Print("Trying Upgrade... ") + fmt.Println("Error not implemented") + } else if os.Args[1] == "version" { + fmt.Print("Version ") + fmt.Println(version) + } else { + fmt.Println("provide a valid command (version or upgrade)") + } +}