20 lines
315 B
Go
20 lines
315 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
app, err := NewApp()
|
|
if err != nil {
|
|
log.Fatalf("unable to setup application: %v", err)
|
|
}
|
|
if len(os.Args) > 1 {
|
|
if err := app.setupCommands().Execute(); err != nil {
|
|
log.Fatalf("error executing command: %v", err)
|
|
}
|
|
} else {
|
|
app.makeChoice()
|
|
}
|
|
}
|