MCPcopy Create free account
hub / github.com/nhost/nhost / LatestRelease

Method LatestRelease

cli/software/sofware.go:105–113  ·  view source on GitHub ↗
(ctx context.Context, version string)

Source from the content-addressed store, hash-verified

103}
104
105func (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
115func (mgr *Manager) DownloadAsset(ctx context.Context, url string, dst io.Writer) error {
116 req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)

Callers

nothing calls this directly

Calls 1

GetReleasesMethod · 0.95

Tested by

no test coverage detected