diff options
| author | Russ Cox <rsc@golang.org> | 2022-11-23 13:45:56 -0500 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-12-02 16:29:41 +0000 |
| commit | 1711f953e48c3de0f85726cb0299c0c0f0b928a1 (patch) | |
| tree | 270ac0747740ad7c5e016f417d36ed3e03a3e585 /src/cmd/api/api_test.go | |
| parent | dadd80ae204bda1c3a48245d8a938f55f71259ea (diff) | |
| download | go-1711f953e48c3de0f85726cb0299c0c0f0b928a1.tar.xz | |
cmd/api: track deprecations
Deprecating an API creates notices that go out to potentially
millions of Go developers encouraging them to update their code.
The choice to deprecate an API is as important as the choice to
add a new API. We should track those and make them explicit.
This will also ensure that deprecations go through proposal review.
Change-Id: Ide9f60c32e5a88fb133e0dfedd984b8b0f70f510
Reviewed-on: https://go-review.googlesource.com/c/go/+/453259
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/api/api_test.go')
| -rw-r--r-- | src/cmd/api/api_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/api/api_test.go b/src/cmd/api/api_test.go index b215c48e73..5f9aa6d297 100644 --- a/src/cmd/api/api_test.go +++ b/src/cmd/api/api_test.go @@ -75,7 +75,7 @@ func TestGolden(t *testing.T) { // TODO(gri) remove extra pkg directory eventually goldenFile := filepath.Join("testdata", "src", "pkg", fi.Name(), "golden.txt") w := NewWalker(nil, "testdata/src/pkg") - pkg, _ := w.Import(fi.Name()) + pkg, _ := w.import_(fi.Name()) w.export(pkg) if *updateGolden { @@ -202,7 +202,7 @@ func BenchmarkAll(b *testing.B) { for _, context := range contexts { w := NewWalker(context, filepath.Join(testenv.GOROOT(b), "src")) for _, name := range w.stdPackages { - pkg, _ := w.Import(name) + pkg, _ := w.import_(name) w.export(pkg) } w.Features() @@ -217,7 +217,7 @@ func TestIssue21181(t *testing.T) { } for _, context := range contexts { w := NewWalker(context, "testdata/src/issue21181") - pkg, err := w.Import("p") + pkg, err := w.import_("p") if err != nil { t.Fatalf("%s: (%s-%s) %s %v", err, context.GOOS, context.GOARCH, pkg.Name(), w.imported) @@ -233,7 +233,7 @@ func TestIssue29837(t *testing.T) { } for _, context := range contexts { w := NewWalker(context, "testdata/src/issue29837") - _, err := w.Import("p") + _, err := w.ImportFrom("p", "", 0) if _, nogo := err.(*build.NoGoError); !nogo { t.Errorf("expected *build.NoGoError, got %T", err) } |
