-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fmt: support printing reflect.Value directly #8965
Labels
Milestone
Comments
I considered option 2, but I'm not sure it's a viable solution, as %v will currently produce moderately useful output when presented with a reflect.Value, because reflect.Value implements String. People are probably relying on that. Ugh, agreed. FWIW I would not have agreed to include this hack in production code, but it's very useful in tests. On reflection, I should probably clone/reimplement that part of fmt, but the above RawValue fix would be preferable. |
I don't understand the issue. This program prints 3. package main import ( type t struct { a int } func main() { |
This shows the problem: package main import ( type t struct{ a int } func main() { |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: