diff options
| author | Dmitri Shuralyov <dmitshur@golang.org> | 2023-04-24 11:26:23 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-04-27 14:06:36 +0000 |
| commit | 0972096c5c2facec2d5c6db08a2df32684f41caa (patch) | |
| tree | fe870971e21bc79f77911f8f3c2a4518c4d2eb0d /src/cmd/api | |
| parent | b4eed1c3414b6def26820a9189cb65cb070540be (diff) | |
| download | go-0972096c5c2facec2d5c6db08a2df32684f41caa.tar.xz | |
cmd/api: make api/next/* entries required, not optional
We want the API check to catch if some API present in api/next/*
files is no longer implemented in the tree, and report it in the
same CL that is making the change (by failing loudly). Arguably
this should've been the case since CL 315350, but I didn't notice
it at the time. Do it now.
For #43956.
Change-Id: I73330dd5fd3f5706a1fdf13b2bf8e0f24c6b48e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/488135
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/cmd/api')
| -rw-r--r-- | src/cmd/api/api.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cmd/api/api.go b/src/cmd/api/api.go index f0d48e3ccd..4dd33b13a5 100644 --- a/src/cmd/api/api.go +++ b/src/cmd/api/api.go @@ -193,13 +193,12 @@ func Check(t *testing.T) { bw := bufio.NewWriter(os.Stdout) defer bw.Flush() - var required []string + var required, optional []string for _, file := range checkFiles { required = append(required, fileFeatures(file, needApproval(file))...) } - var optional []string for _, file := range nextFiles { - optional = append(optional, fileFeatures(file, true)...) + required = append(required, fileFeatures(file, true)...) } exception := fileFeatures(filepath.Join(testenv.GOROOT(t), "api/except.txt"), false) |
