devops-sing/cmd/root.go

31 lines
506 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "devops-sing",
Short: "Devops-sing is a tool for devops",
Long: `Devops-sing is a tool for devops.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Execute the command devops-sing -h to view the usage method.")
},
}
func init() {
rootCmd.AddCommand()
rootCmd.AddCommand(nmapCmd)
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}