Track bundled vendor runtime sources
This commit is contained in:
29
vendor/aigcpanel/cli/cmd/root.go
vendored
Normal file
29
vendor/aigcpanel/cli/cmd/root.go
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var appVersion string
|
||||
|
||||
// Execute sets the version and runs the root command.
|
||||
func Execute(version string) {
|
||||
appVersion = version
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "aigcpanel",
|
||||
Short: "AIGCPanel CLI",
|
||||
Long: "AIGCPanel command-line tool for interacting with the local AigcPanel service.",
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
rootCmd.AddCommand(modelListCmd)
|
||||
rootCmd.AddCommand(taskCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user