diff options
| author | Hana Kim <hyangah@gmail.com> | 2026-03-05 22:48:28 -0500 |
|---|---|---|
| committer | Hyang-Ah Hana Kim <hyangah@gmail.com> | 2026-03-26 14:11:53 -0700 |
| commit | 81ffb8b9704ea4f04dfc06ccb3300d236e8aeef2 (patch) | |
| tree | 96dd18e795d7faa1a9b28ac23eaadfab3e86c5a2 /internal/symbol/goapi.go | |
| parent | 98258ff769bbca6f3d004ce80fabf5bff8f1136c (diff) | |
| download | go-x-pkgsite-81ffb8b9704ea4f04dfc06ccb3300d236e8aeef2.tar.xz | |
all: run go fix -stringsbuilder
Change-Id: I839e47c2b39ee592909f7ecb03603d4fb1d1954b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/753430
Reviewed-by: Jonathan Amsterdam <jba@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'internal/symbol/goapi.go')
| -rw-r--r-- | internal/symbol/goapi.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/symbol/goapi.go b/internal/symbol/goapi.go index fd4cc840..5dbea638 100644 --- a/internal/symbol/goapi.go +++ b/internal/symbol/goapi.go @@ -83,7 +83,8 @@ func tagKey(dir string, context *build.Context, tags []string) string { ctags[tag] = true } // TODO: ReleaseTags (need to load default) - key := dir + var key strings.Builder + key.WriteString(dir) // explicit on GOOS and GOARCH as global cache will use "all" cached packages for // an indirect imported package. See https://github.com/golang/go/issues/21181 // for more detail. @@ -91,11 +92,11 @@ func tagKey(dir string, context *build.Context, tags []string) string { sort.Strings(tags) for _, tag := range tags { if ctags[tag] { - key += "," + tag + key.WriteString("," + tag) ctags[tag] = false } } - return key + return key.String() } var listCache sync.Map // map[string]listImports, keyed by contextName |
