
* Change cmd setup to bubble up errors over exiting * Update main to handle execute error * Update changelog with PR #454 * Slight cleanup tweaks
22 строки
391 Б
Go
22 строки
391 Б
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/cucumber/godog/cmd/godog/internal"
|
|
)
|
|
|
|
func main() {
|
|
rootCmd := internal.CreateRootCmd()
|
|
buildCmd := internal.CreateBuildCmd()
|
|
runCmd := internal.CreateRunCmd()
|
|
versionCmd := internal.CreateVersionCmd()
|
|
|
|
rootCmd.AddCommand(&buildCmd, &runCmd, &versionCmd)
|
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
fmt.Println(err)
|
|
os.Exit(1)
|
|
}
|
|
}
|