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: drop Scanf %X support for bytes and strings? #13585

rsc opened this issue Dec 11, 2015 · 1 comment

fmt: drop Scanf %X support for bytes and strings? #13585

rsc opened this issue Dec 11, 2015 · 1 comment


Copy link

@rsc rsc commented Dec 11, 2015

CL made a trivial change to fmt.Scanf to make %X an alias for %x when applied to []byte and string values.
%x has always (even before Go 1) accepted either upper or lower case; now %X does too.

The only real effect here is that now people can write code using %X, which will only work with Go 1.6 or later, when they could instead use %x and work with Go 1 or later.

Should we keep the new %X support?
Leaving for @robpike to decide.

The original issue was #12940.

@rsc rsc added this to the Go1.6 milestone Dec 11, 2015
Copy link

@robpike robpike commented Dec 11, 2015

It seems like a regularization to accept %X, but there is always a cost to any addition of a feature. Taking that worry too far, we can't change anything ever.

The problem of versioning is being addressed by the community, and in that light I think it's fine for this minor cleanup to persist.

@robpike robpike closed this Dec 11, 2015
@golang golang locked and limited conversation to collaborators Dec 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.