]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[release-branch.go1.20] cmd/api: rename api.go to main_test.go
authorRuss Cox <rsc@golang.org>
Wed, 16 Aug 2023 15:18:02 +0000 (11:18 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 17 Aug 2023 20:58:04 +0000 (20:58 +0000)
This makes cmd/api no longer an importable package.
In CL 453258 I forgot that there was no direct prohibition
on importing packages from cmd - we just rely on the
fact that cmd/* is all package main and everything else
is cmd/internal.

Fixes #62069.
Fixes #62070.

Change-Id: Ifed738d333b40663f85eca8f83025fcea5df89a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/520038
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/520060
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>

src/cmd/api/api_test.go
src/cmd/api/boring_test.go
src/cmd/api/main_test.go [moved from src/cmd/api/api.go with 99% similarity]

index 5f9aa6d297dbaa9ce87eae1eef8fcd5da12c006c..dbd31d8242f7245d895ee7486dbbcebcc7b5a09d 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package api
+package main
 
 import (
        "flag"
index a9ec6e6bfefb765e00380aed5eedf0b91dc43a3f..f0e3575637c62a955f118943cc752f44be8c5d7f 100644 (file)
@@ -4,7 +4,7 @@
 
 //go:build boringcrypto
 
-package api
+package main
 
 import (
        "fmt"
similarity index 99%
rename from src/cmd/api/api.go
rename to src/cmd/api/main_test.go
index 399da1c0de5bdc5ee57634416e3a24a9f6bbe361..407e314e51f3b788be2be9ec72ca5eb00dbaab43 100644 (file)
@@ -2,9 +2,10 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Package api computes the exported API of a set of Go packages.
+// This package computes the exported API of a set of Go packages.
 // It is only a test, not a command, nor a usefully importable package.
-package api
+
+package main
 
 import (
        "bufio"