kubeeye/cmd/audit.go

27 lines
441 B
Go
Raw Normal View History

package cmd
import (
"flag"
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"kubeye/pkg/validator"
)
func init() {
rootCmd.AddCommand(auditCmd)
flag.Parse()
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
}
var auditCmd = &cobra.Command{
Use: "audit",
Short: "audit the result",
Run: func(cmd *cobra.Command, args []string) {
2020-11-20 18:57:02 +08:00
err := validator.Cluster(cmd.Context())
if err != nil {
fmt.Println(err)
}
},
}