-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.help wantedpkgsite
Milestone
Description
Update: see #12794 (comment)
% export GOPATH=$(pwd)
% cat src/foo1/foo.go
package foo
func Foo() {
}
% cat src/foo1/foo_test.go
package foo_test
import "foo1" // defines foo
func ExampleFoo() {
foo.Foo()
}
% godoc -play -http :9999 &
% open http://localhost:9999/pkg/foo1/#pkg-examples
The example is shown but not executable (grey not yellow); renaming foo1 to foo makes it executable, as does using an explicit (redundant) renaming import:
import foo "foo1"
Seems like some code in godoc is assuming pkg.name == basename(pkg.path) instead of finding the actual package name.
Metadata
Metadata
Assignees
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.help wantedpkgsite