go/doc: make examples that depend on top-level decls playable
Currently, the following example cannot run in playground: func a() { fmt.Println("A") } func ExampleA() { a() } This CL solves it. Fixes #23095 Change-Id: I5a492ff886a743f20cb4ae646e8453bde9c5f0da Reviewed-on: https://go-review.googlesource.com/83615 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Showing
Please register or sign in to comment