2024-07-18 17:21:37 +08:00
|
|
|
package main
|
2024-07-18 17:18:45 +08:00
|
|
|
|
|
|
|
import "fmt"
|
2024-07-18 17:32:07 +08:00
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
|
|
|
|
var rootCmd = &cobra.Command{
|
|
|
|
Use: "hello",
|
|
|
|
Short: "Hello, World!",
|
|
|
|
Long: `Hello, World!`,
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2024-07-18 17:36:07 +08:00
|
|
|
fmt.Println("Hello, World! corbra")
|
2024-07-18 17:32:07 +08:00
|
|
|
},
|
|
|
|
}
|
2024-07-18 17:18:45 +08:00
|
|
|
|
|
|
|
func main() {
|
2024-07-18 17:33:30 +08:00
|
|
|
rootCmd.Execute()
|
2024-07-18 17:18:45 +08:00
|
|
|
}
|