(ctx context.Context, version string)
| 103 | } |
| 104 | |
| 105 | func (mgr *Manager) LatestRelease(ctx context.Context, version string) (Release, error) { |
| 106 | if mgr.cache == nil { |
| 107 | if _, err := mgr.GetReleases(ctx, version); err != nil { |
| 108 | return Release{}, err |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | return mgr.cache[0], nil |
| 113 | } |
| 114 | |
| 115 | func (mgr *Manager) DownloadAsset(ctx context.Context, url string, dst io.Writer) error { |
| 116 | req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) |
nothing calls this directly
no test coverage detected