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: document interaction between space and %q #4581

Closed
dsymonds opened this issue Dec 21, 2012 · 2 comments
Closed

fmt: document interaction between space and %q #4581

dsymonds opened this issue Dec 21, 2012 · 2 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@dsymonds
Copy link
Contributor

What would you expect fmt.Sprintf("% 8q", "woo") to return? Right
now it yields `   "woo"`; that is, space padding is applied after quoting. I
would have expected the space padding to be done first, and quoting after, but either
way it is not documented in fmt.
@rsc
Copy link
Contributor

rsc commented Dec 21, 2012

Comment 1:

Current behavior seems fine (and consistent) to me.
http://play.golang.org/p/KTXnB7Uxkp
Really space is the default for non-numeric padding, so % 8q and %8q are the same.

Labels changed: added priority-later, size-s, suggested, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 22, 2012

Comment 2:

This issue was closed by revision 1cad1f8.

Status changed to Fixed.

@dsymonds dsymonds added fixed Suggested Issues that may be good for new contributors looking for work to do. labels Dec 22, 2012
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 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.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

3 participants