MCPcopy Index your code
hub / github.com/deepflowio/deepflow / deletePlugin

Function deletePlugin

cli/ctl/plugin.go:165–176  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

163}
164
165func deletePlugin(cmd *cobra.Command, args []string) error {
166 if len(args) == 0 {
167 return fmt.Errorf("must specify name\nExample: %s", cmd.Example)
168 } else if len(args) > 1 {
169 return fmt.Errorf("must specify one name\nExample: %s", cmd.Example)
170 }
171
172 server := common.GetServerInfo(cmd)
173 url := fmt.Sprintf("http://%s:%d/v1/plugin/%s/", server.IP, server.Port, args[0])
174 _, err := common.CURLPerform("DELETE", url, nil, "", []common.HTTPOption{common.WithTimeout(common.GetTimeout(cmd)), common.WithORGID(common.GetORGID(cmd))}...)
175 return err
176}

Callers 1

RegisterPluginCommandFunction · 0.70

Calls 2

ErrorfMethod · 0.45
GetORGIDMethod · 0.45

Tested by

no test coverage detected