cdglab/cmd/root.go
cdryzun 95847ff050
Some checks failed
Release / release (push) Failing after 5m5s
first commit
2023-12-23 18:36:28 +08:00

31 lines
555 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "cdglab",
Short: "cdglab is a tool for gitlab CI-CD.",
Long: `cdglab is a basic tool for Gitlab CI/CD, used to encapsulate a series of RESTful API calls.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Execute the command cdglab -h to view the usage method.")
},
}
func init() {
rootCmd.AddCommand()
rootCmd.AddCommand(rawCmd)
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}