diff options
| author | Julie Qiu <julie@golang.org> | 2020-07-10 00:29:42 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2020-07-10 17:32:36 +0000 |
| commit | 7279dbeffaab752db47ed69e801d207b24134b3a (patch) | |
| tree | cc02315a7dd4fbef07adc4c44a6c5c5d55c50819 /internal/postgres/insert_module_test.go | |
| parent | 89dd2f627b28fa51cefc382524afb6f29cf494e3 (diff) | |
| download | go-x-pkgsite-7279dbeffaab752db47ed69e801d207b24134b3a.tar.xz | |
internal: remove New suffix from structs
The New suffix is removed from PackageNew and DirectoryNew, since the
legacy methods are already prefixed with "Legacy".
For golang/go#39629
Change-Id: I8be32310c6b451035021663000aac6ca845ee6e0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241900
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/insert_module_test.go')
| -rw-r--r-- | internal/postgres/insert_module_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go index 89043d2d..797282e4 100644 --- a/internal/postgres/insert_module_test.go +++ b/internal/postgres/insert_module_test.go @@ -109,7 +109,7 @@ func checkModule(ctx context.Context, t *testing.T, want *internal.Module) { } for _, dir := range want.Directories { - got, err := testDB.GetDirectoryNew(ctx, dir.Path, want.ModulePath, want.Version) + got, err := testDB.GetDirectory(ctx, dir.Path, want.ModulePath, want.Version) if err != nil { t.Fatal(err) } @@ -120,8 +120,8 @@ func checkModule(ctx context.Context, t *testing.T, want *internal.Module) { Contents: sample.ReadmeContents, } wantd := internal.VersionedDirectory{ - DirectoryNew: *dir, - ModuleInfo: want.ModuleInfo, + Directory: *dir, + ModuleInfo: want.ModuleInfo, } opts := cmp.Options{ cmpopts.IgnoreFields(internal.LegacyModuleInfo{}, "LegacyReadmeFilePath"), @@ -130,7 +130,7 @@ func checkModule(ctx context.Context, t *testing.T, want *internal.Module) { cmp.AllowUnexported(source.Info{}, safehtml.HTML{}), } if diff := cmp.Diff(wantd, *got, opts); diff != "" { - t.Errorf("testDB.getDirectoryNew(%q, %q) mismatch (-want +got):\n%s", dir.Path, want.Version, diff) + t.Errorf("testDB.getDirectory(%q, %q) mismatch (-want +got):\n%s", dir.Path, want.Version, diff) } } } |
