(cmd *cobra.Command, args []string)
| 163 | } |
| 164 | |
| 165 | func 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 | } |
no test coverage detected