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

Function installedParentNames

cmd/crowdsec-cli/cliitem/cmdremove.go:77–87  ·  view source on GitHub ↗

return the names of the installed parents of an item, used to check if we can remove it

(item *cwhub.Item)

Source from the content-addressed store, hash-verified

75
76// return the names of the installed parents of an item, used to check if we can remove it
77func installedParentNames(item *cwhub.Item) []string {
78 ret := make([]string, 0)
79
80 for _, parent := range item.Ancestors() {
81 if parent.State.IsInstalled() {
82 ret = append(ret, parent.Name)
83 }
84 }
85
86 return ret
87}
88
89func (cli *cliItem) remove(ctx context.Context, args []string, interactive bool, dryRun bool, purge bool, force bool, all bool) error {
90 cfg := cli.cfg()

Callers 1

removePlanMethod · 0.85

Calls 2

AncestorsMethod · 0.80
IsInstalledMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…