Skip to content
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: include concrete type names when using %#v #7082

Closed
gopherbot opened this issue Jan 8, 2014 · 2 comments
Closed

fmt: include concrete type names when using %#v #7082

gopherbot opened this issue Jan 8, 2014 · 2 comments
Assignees

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 8, 2014

by genial@alva.ro:

Formatting using %#v loses the concrete type of any value (at least of basic types) that
is held through an interface type, which makes them impossible to reconstruct, and also
violates the claim of "a Go-syntax representation of the value", because the
result is a different value of a different type.

What steps will reproduce the problem?
http://play.golang.org/p/RebBqTAjS0

What is the expected output?
`main.Bar{Qux:main.Foo(0)}`

What do you see instead?
`main.Bar{Qux:0}`
@griesemer
Copy link
Contributor

@griesemer griesemer commented Feb 12, 2014

Comment 1:

Labels changed: added repo-main.

Owner changed to @robpike.

@rsc
Copy link
Contributor

@rsc rsc commented Mar 3, 2014

Comment 2:

I don't believe we should change this at this point. It's never been copy-and-paste-able
into a Go program.

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.