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

strconv: Documentation to strconv.Itoa is misleading #12531

Closed
jellonek opened this issue Sep 7, 2015 · 0 comments
Closed

strconv: Documentation to strconv.Itoa is misleading #12531

jellonek opened this issue Sep 7, 2015 · 0 comments

Comments

@jellonek
Copy link

jellonek commented Sep 7, 2015

Docstring added in efbeaed#diff-ad34fc4c548aecacd88a4f12a256a414R42 suggests that Itoa is an alias to FormatInt with decimal base, but this shorthand also transforms argument from int type into int64 (what shortens input data value range in default implementation).

This comment IMO should be extended to clearly inform that input data format is changed (that is visible in functions signatures as in source of this function, but what can be easily overlooked).

@ianlancetaylor ianlancetaylor changed the title Documentation to strconv.Itoa is misleading strconv: Documentation to strconv.Itoa is misleading Sep 8, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Sep 8, 2015
@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants