Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
go/parser: example for ParseFile fails on golang.org (playground) #19823
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
The example is being run in the (Go Playground)[https://play.golang.org/]
Does the example work when you copy it to a new package and include a valid 'example_test.go' file?
The example shouldn't rely on the existance of example_test.go. That breaks in the playground, which is what the "run" button in https://golang.org/pkg/go/parser/#example_ParseFile does. Make the example self-sufficient by using a small piece of source via a string literal instead. Fixes golang#19823. Change-Id: Ie8a3c6c5d00724e38ff727862b62e6a3621adc88 Reviewed-on: https://go-review.googlesource.com/39236 Run-TryBot: Daniel Martí <email@example.com> Reviewed-by: Robert Griesemer <firstname.lastname@example.org>