aboutsummaryrefslogtreecommitdiff
path: root/internal/testing/sample
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2020-08-31 23:53:49 -0400
committerJulie Qiu <julie@golang.org>2020-09-01 14:48:33 +0000
commitaa55b12cd0c3639a5371bbfca1ff6882fc1bd64c (patch)
treeb7042d3a47137cae06341ed928b00d8a7dcfa4a8 /internal/testing/sample
parentf773eeaf37917464ad024d1e966254e091e390f1 (diff)
downloadgo-x-pkgsite-aa55b12cd0c3639a5371bbfca1ff6882fc1bd64c.tar.xz
internal: rename PathInfo to UnitMeta
PathInfo is renamed to UnitMeta, and GetPathInfo is renamed to GetUnitMeta. For golang/go#39629 Change-Id: Ia91cf7d2752988653efcc0e46a4d6b8b63017ef3 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251978 Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/testing/sample')
-rw-r--r--internal/testing/sample/sample.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go
index cf779696..bbe70832 100644
--- a/internal/testing/sample/sample.go
+++ b/internal/testing/sample/sample.go
@@ -254,12 +254,12 @@ func AddLicense(m *internal.Module, lic *licenses.License) {
func UnitEmpty(path, modulePath, version string) *internal.Unit {
return &internal.Unit{
- PathInfo: *PathInfo(path, modulePath, version, "", true),
+ UnitMeta: *UnitMeta(path, modulePath, version, "", true),
}
}
func UnitForModuleRoot(m *internal.LegacyModuleInfo, licenses []*licenses.Metadata) *internal.Unit {
- d := &internal.Unit{PathInfo: *PathInfo(m.ModulePath, m.ModulePath, m.Version, "", m.IsRedistributable)}
+ d := &internal.Unit{UnitMeta: *UnitMeta(m.ModulePath, m.ModulePath, m.Version, "", m.IsRedistributable)}
if m.LegacyReadmeFilePath != "" {
d.Readme = &internal.Readme{
Filepath: m.LegacyReadmeFilePath,
@@ -271,7 +271,7 @@ func UnitForModuleRoot(m *internal.LegacyModuleInfo, licenses []*licenses.Metada
func UnitForPackage(pkg *internal.LegacyPackage, modulePath, version string) *internal.Unit {
return &internal.Unit{
- PathInfo: *PathInfo(pkg.Path, modulePath, version, pkg.Name, pkg.IsRedistributable),
+ UnitMeta: *UnitMeta(pkg.Path, modulePath, version, pkg.Name, pkg.IsRedistributable),
Imports: pkg.Imports,
Package: &internal.Package{
Name: pkg.Name,
@@ -286,8 +286,8 @@ func UnitForPackage(pkg *internal.LegacyPackage, modulePath, version string) *in
}
}
-func PathInfo(path, modulePath, version, name string, isRedistributable bool) *internal.PathInfo {
- return &internal.PathInfo{
+func UnitMeta(path, modulePath, version, name string, isRedistributable bool) *internal.UnitMeta {
+ return &internal.UnitMeta{
ModulePath: modulePath,
Version: version,
Path: path,