20 lines
412 B
Go
20 lines
412 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(checkCmd)
|
|
}
|
|
|
|
var checkCmd = &cobra.Command{
|
|
Use: "check [...<check-ids>]",
|
|
Short: "One-off run all or specific healthchecks",
|
|
Long: "specify target IDs to watch them for events",
|
|
Args: ValidateCheckID,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
cmd.SilenceUsage = true
|
|
return checkAndNotify(args)
|
|
},
|
|
}
|