(client *client, options *DeleteOptions)
| 130 | } |
| 131 | |
| 132 | func deleteCluster(client *client, options *DeleteOptions) error { |
| 133 | rsp, err := client.restyCli.R(). |
| 134 | SetPathParams(map[string]string{ |
| 135 | "namespace": options.namespace, |
| 136 | "cluster": options.cluster, |
| 137 | }).Delete("/namespaces/{namespace}/clusters/{cluster}") |
| 138 | if err != nil { |
| 139 | return err |
| 140 | } |
| 141 | if rsp.IsError() { |
| 142 | return unmarshalError(rsp.Body()) |
| 143 | } |
| 144 | printLine("delete cluster: %s successfully.", options.cluster) |
| 145 | return nil |
| 146 | } |
| 147 | |
| 148 | func deleteShard(client *client, options *DeleteOptions) error { |
| 149 | rsp, err := client.restyCli.R(). |
no test coverage detected