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: accepts non strings/chars with verb "%q" #2851

Closed
remyoudompheng opened this issue Feb 2, 2012 · 3 comments
Closed

fmt: accepts non strings/chars with verb "%q" #2851

remyoudompheng opened this issue Feb 2, 2012 · 3 comments
Assignees
Milestone

Comments

@remyoudompheng
Copy link
Contributor

@remyoudompheng remyoudompheng commented Feb 2, 2012

What steps will reproduce the problem?
1. Compile and run

package main

import "fmt"

func tool(name string) string {
    return "tool/" + name
}

func main() {
    fmt.Printf("tool %q\n", tool)
}

What is the expected output? What do you see instead?

Got:
tool 0x400c00

Expected:
tool %!q(0x400c00)

or proper documentation of the behaviour of verb %q.
@rsc
Copy link
Contributor

@rsc rsc commented Feb 2, 2012

Comment 1:

Labels changed: added priority-go1, removed priority-triage.

Owner changed to builder@golang.org.

Status changed to Accepted.

@rsc
Copy link
Contributor

@rsc rsc commented Feb 7, 2012

Comment 2:

Owner changed to @rsc.

Status changed to Started.

@rsc
Copy link
Contributor

@rsc rsc commented Feb 8, 2012

Comment 3:

This issue was closed by revision 00134fe.

Status changed to Fixed.

@rsc rsc added this to the Go1 milestone Apr 10, 2015
@rsc rsc removed the priority-go1 label Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 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
3 participants
You can’t perform that action at this time.