MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / newStatusCmd

Method newStatusCmd

cmd/crowdsec-cli/clilapi/status.go:106–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106func (cli *cliLapi) newStatusCmd() *cobra.Command {
107 cmdLapiStatus := &cobra.Command{
108 Use: "status",
109 Short: "Check authentication to Local API (LAPI)",
110 Args: args.NoArgs,
111 DisableAutoGenTag: true,
112 RunE: func(cmd *cobra.Command, _ []string) error {
113 hub, err := require.Hub(cli.cfg(), nil)
114 if err != nil {
115 return err
116 }
117
118 return cli.Status(cmd.Context(), color.Output, hub)
119 },
120 }
121
122 return cmdLapiStatus
123}

Callers 1

NewCommandMethod · 0.95

Calls 3

StatusMethod · 0.95
HubFunction · 0.92
cfgMethod · 0.80

Tested by

no test coverage detected