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.
fmt: invoke String() / GoString() and Format() on unexported fields #18281
First, I'll say up front that this is a Feature Request.
What version of Go are you using (
This is impossible to do without using unsafe as it's limited by the reflect package (you can't call methods on unexported fields.) That said, there are some go-gettable packages out there that use unsafe to get this done. e.g. https://godoc.org/github.com/davecgh/go-spew/spew