MCPcopy
hub / github.com/crowdsecurity/crowdsec / newValidateCmd

Method newValidateCmd

cmd/crowdsec-cli/climachine/validate.go:23–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23func (cli *cliMachines) newValidateCmd() *cobra.Command {
24 cmd := &cobra.Command{
25 Use: "validate",
26 Short: "validate a machine to access the local API",
27 Long: `validate a machine to access the local API.`,
28 Example: `cscli machines validate "machine_name"`,
29 Args: args.ExactArgs(1),
30 DisableAutoGenTag: true,
31 RunE: func(cmd *cobra.Command, args []string) error {
32 return cli.validate(cmd.Context(), args[0])
33 },
34 }
35
36 return cmd
37}

Callers 1

NewCommandMethod · 0.95

Calls 2

validateMethod · 0.95
ExactArgsFunction · 0.92

Tested by

no test coverage detected