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

Method newContextDeleteCmd

cmd/crowdsec-cli/clilapi/context.go:237–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235}
236
237func (cli *cliLapi) newContextDeleteCmd() *cobra.Command {
238 cmd := &cobra.Command{
239 Use: "delete",
240 DisableAutoGenTag: true,
241 RunE: func(_ *cobra.Command, _ []string) error {
242 filePath := cli.cfg().Crowdsec.ConsoleContextPath
243 if filePath == "" {
244 filePath = "the context file"
245 }
246
247 return fmt.Errorf("command 'delete' has been removed, please manually edit %s", filePath)
248 },
249 }
250
251 return cmd
252}
253
254func (cli *cliLapi) newContextCmd() *cobra.Command {
255 cmd := &cobra.Command{

Callers 1

newContextCmdMethod · 0.95

Calls 1

cfgMethod · 0.80

Tested by

no test coverage detected