[pkgsite] internal/godoc: smarter import path resolution

2 views
Skip to first unread message

Sean Liao (Gerrit)

unread,
Dec 14, 2025, 3:44:59 AM (2 days ago) Dec 14
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Ethan Lee, kokoro, Go LUCI, Jonathan Amsterdam, Robert Findley, golang-co...@googlegroups.com

Sean Liao submitted the change

Change information

Commit message:
internal/godoc: smarter import path resolution

simpleImporter is a little too simple to handle imports
of v2+ packages. This reuses the same logic that go/doc
internally uses for its unexported importByName field.

This also deduplicates a few copies of the same function.

Fixes golang/go#60404
Change-Id: I59665b51c8081d7719c65ebc7c5198a26a6a6964
Reviewed-by: Ethan Lee <etha...@google.com>
kokoro-CI: kokoro <noreply...@google.com>
Reviewed-by: Jonathan Amsterdam <j...@google.com>
Files:
  • M internal/godoc/dochtml/dochtml_test.go
  • M internal/godoc/dochtml/internal/render/render_test.go
  • A internal/godoc/importer/importer.go
  • A internal/godoc/importer/importer_test.go
  • M internal/godoc/render.go
Change size: L
Delta: 5 files changed, 206 insertions(+), 50 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Jonathan Amsterdam, +2 by Ethan Lee
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
  • requirement satisfiedkokoro-CI-Passes: kokoro-CI+1 by kokoro
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: pkgsite
Gerrit-Branch: master
Gerrit-Change-Id: I59665b51c8081d7719c65ebc7c5198a26a6a6964
Gerrit-Change-Number: 728261
Gerrit-PatchSet: 5
Gerrit-Owner: Sean Liao <se...@liao.dev>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Jonathan Amsterdam <j...@google.com>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
Gerrit-Reviewer: kokoro <noreply...@google.com>
Gerrit-CC: Robert Findley <rfin...@golang.org>
Gerrit-CC: kokoro <noreply...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages