зеркало из https://github.com/golang/pkgsite.git
internal/proxydatasource: use LatestModuleVersions
For golang/go#44710 Change-Id: I070c7f446e94511006d1d97b0bdd6a380e012c63 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/298233 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
This commit is contained in:
Родитель
918cb8aa8c
Коммит
1fabe838f6
|
@ -109,11 +109,11 @@ func (ds *DataSource) getModule(ctx context.Context, modulePath, version string)
|
|||
}
|
||||
// Use the go.mod file at the raw latest version to fill in deprecation
|
||||
// and retraction information.
|
||||
rawLatest, err := fetch.RawLatestInfo(ctx, modulePath, ds.proxyClient, nil)
|
||||
lmv, err := fetch.LatestModuleVersions(ctx, modulePath, ds.proxyClient, nil)
|
||||
if err != nil {
|
||||
res.Error = err
|
||||
} else {
|
||||
rawLatest.PopulateModuleInfo(&m.ModuleInfo)
|
||||
lmv.PopulateModuleInfo(&m.ModuleInfo)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче