26 lines
462 B
Go
26 lines
462 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
|
||
|
"git.cherry.town/town/cherry/launcher"
|
||
|
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
var rootCmd = &cobra.Command{
|
||
|
Use: "cherry",
|
||
|
Short: "command-line utilities for cherry.town",
|
||
|
Long: "command-line utilities for cherry.town. if no sub-command\n" +
|
||
|
"is specified, the cherry.town program directory will be run.",
|
||
|
RunE: launcher.Run,
|
||
|
}
|
||
|
|
||
|
func Execute() {
|
||
|
if err := rootCmd.Execute(); err != nil {
|
||
|
fmt.Println(err)
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
}
|