]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: remove temporary crypto/internal/fips140 import relaxation
authorRuss Cox <rsc@golang.org>
Wed, 20 Nov 2024 15:25:44 +0000 (10:25 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 20 Nov 2024 20:56:02 +0000 (20:56 +0000)
Now that crypto/internal/fips140deps has been checked in,
we can enforce the full restrictions in the go command:
crypto/internal/fips can only import crypto/internal, not internal/...

Change-Id: I035470dbd478a5997c37ffabd268117969ed00a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/630135
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>

src/cmd/go/internal/load/pkg.go

index 4daa0df45c0a6fa8a7ee7a532e740258c61b24c1..df790e1eaab616f989784245ec1824183f0a6445 100644 (file)
@@ -1533,17 +1533,6 @@ func disallowInternal(ctx context.Context, srcDir string, importer *Package, imp
                if str.HasPathPrefix(p.ImportPath, "crypto/internal") {
                        return nil // crypto/internal/fips140 can use crypto/internal
                }
-               // TODO: Delete this switch once the usages are removed.
-               switch p.ImportPath {
-               case "internal/abi",
-                       "internal/testenv",
-                       "internal/cpu",
-                       "internal/goarch",
-                       "internal/asan",
-                       "internal/byteorder",
-                       "internal/godebug":
-                       return nil
-               }
                goto Error
        }