]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go/internal/modload: avoid calling strings.HasPrefix twice in *MainModuleSet...
authorJes Cok <xigua67damn@gmail.com>
Mon, 6 Nov 2023 14:27:32 +0000 (14:27 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 8 Nov 2023 17:54:17 +0000 (17:54 +0000)
commitba0dd3b328d16e0e66a6fcb8be5fda266d965ea2
treebd7eebe74a4be460c77a37b899b4ddeb637778d2
parent374a56ca33d48f0a70adbf3d94763fbcab5dd5a4
cmd/go/internal/modload: avoid calling strings.HasPrefix twice in *MainModuleSet.DirImportPath

Since TrimPrefix uses HasPrefix internally.

Change-Id: Ifadb99dd9192578056636adacaccc9d88a1c1f32
GitHub-Last-Rev: 74bcfff3fb5eaee281796ccb5bc84c6941d44615
GitHub-Pull-Request: golang/go#63893
Reviewed-on: https://go-review.googlesource.com/c/go/+/539096
Run-TryBot: Jes Cok <xigua67damn@gmail.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/modload/load.go