(pluginURL string, path string, proxyReader ProxyReader)
| 3 | import "os" |
| 4 | |
| 5 | func (client *Client) DownloadPlugin(pluginURL string, path string, proxyReader ProxyReader) error { |
| 6 | request, err := client.newGETRequest(pluginURL) |
| 7 | if err != nil { |
| 8 | return err |
| 9 | } |
| 10 | |
| 11 | response := Response{} |
| 12 | err = client.connection.Make(request, &response, proxyReader) |
| 13 | if err != nil { |
| 14 | return err |
| 15 | } |
| 16 | |
| 17 | err = os.WriteFile(path, response.RawResponse, 0700) |
| 18 | if err != nil { |
| 19 | return err |
| 20 | } |
| 21 | |
| 22 | return nil |
| 23 | } |
nothing calls this directly
no test coverage detected