aboutsummaryrefslogtreecommitdiff
path: root/internal/testing/sample/sample.go
diff options
context:
space:
mode:
authorEthan Lee <ethanalee@google.com>2026-03-18 20:31:16 +0000
committerGopher Robot <gobot@golang.org>2026-03-25 08:29:54 -0700
commitc57126f9757fb25c781a59cb9ecc97b0af63727a (patch)
tree48b516ffb19fc89d36ed25094c3a8f74a11b754a /internal/testing/sample/sample.go
parent86d1c7b3f2f2d36dbaf488d847c09e1655356ca7 (diff)
downloadgo-x-pkgsite-c57126f9757fb25c781a59cb9ecc97b0af63727a.tar.xz
all: add LatestVersion to ModuleInfo
- Add LatestVersion field to internal.ModuleInfo and update tests accordingly. - Changed some test formatting to improve readability. Change-Id: I1238e54614ef276d219b31d125cd2cad6b5a66f7 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/756901 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> kokoro-CI: kokoro <noreply+kokoro@google.com> Auto-Submit: Ethan Lee <ethanalee@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/testing/sample/sample.go')
-rw-r--r--internal/testing/sample/sample.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go
index 610dcab2..f08d3bfa 100644
--- a/internal/testing/sample/sample.go
+++ b/internal/testing/sample/sample.go
@@ -273,6 +273,7 @@ func ModuleInfo(modulePath, versionString string) *internal.ModuleInfo {
SourceInfo: source.NewGitHubInfo("https://"+modulePath, "", versionString),
IsRedistributable: true,
HasGoMod: true,
+ LatestVersion: versionString,
}
}
@@ -363,6 +364,7 @@ func UnitMeta(path, modulePath, version, name string, moduleIsRedistributable bo
CommitTime: NowTruncated(),
IsRedistributable: moduleIsRedistributable,
SourceInfo: source.NewGitHubInfo("https://"+modulePath, "", version),
+ LatestVersion: version,
},
}
}