github.com/TNTworks/flogo-cli@v0.9.1-0.20220522183836-60b8a963ae00/cmd/flogo/main.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "os" 6 7 "github.com/TNTworks/flogo-cli/commands" 8 "github.com/TNTworks/flogo-cli/util" 9 ) 10 11 // Not set by default, will be filled by init() function in "./currentversion.go" file, if it exists. 12 // This latter file is generated with a "go generate" command. 13 var Version string = "" 14 15 //go:generate go run gen/version.go 16 func main() { 17 18 if util.GetGoPath() == "" { 19 _, _ = fmt.Fprintf(os.Stderr, "Error: GOPATH must be set before running flogo cli\n") 20 os.Exit(1) 21 } 22 23 //Initialize the commands 24 _ = os.Setenv("GO111MODULE", "on") 25 commands.Initialize(Version) 26 commands.Execute() 27 }