Clean start

This commit is contained in:
Lukas Bachschwell 2021-01-09 16:14:47 +01:00
commit 7bbdcc591d
Signed by: lbsadmin
GPG Key ID: CCC6AA87CC8DF425
2 changed files with 26 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module goselfupdatetest
go 1.15

23
main.go Normal file
View File

@ -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)")
}
}