go/doc: example including go-
prefixed packages not considered as playable
#56740
Labels
FixPending
Issues that have a fix which has not yet been reviewed or submitted.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go 1.19
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Playground env
What did you do?
See https://go.dev/play/p/SPW5ePcwU2Y
What did you expect to see?
The three examples should be playable
What did you see instead?
Example including
go-
prefixed packages not rendered as playable example, unless use of totally useless explicit aliasmypkg
is playablego-mypkg
is not playablego-mypkg
usingmypkg
alias is playableAdditional information
Issue might come from there, as import path contains
go-
prefix, it doesn't match the package name at runtime (wherego-
prefix is automatically removed), therefore related package is considered as unresolved, which leads to the whole example not considered playable.One solution might be to trim
go-
prefix before that lineThe text was updated successfully, but these errors were encountered: