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: Documentation for *scanf should mention whether short reads are errors. #8708

Closed
bcmills opened this issue Sep 11, 2014 · 2 comments
Closed
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Sep 11, 2014

The comment for fmt.Fscan says:

It returns the number of items successfully scanned. If that is less than the number of
arguments, err will report why.


But fmt.Fscanf only says:

It returns the number of items successfully parsed.


From reading the source, it seems that the formatted variants are also intended to
return a non-nil error for short scans:
http://play.golang.org/p/aS0XEsQLWp

If so, the documentation should be made consistent to reflect this.
@ianlancetaylor
Copy link
Member

Comment 1:

Labels changed: added repo-main, release-none, documentation.

@bcmills bcmills added new Documentation Issues describing a change to documentation. labels Sep 12, 2014
@bradfitz bradfitz removed the new label Dec 18, 2014
@robpike robpike self-assigned this Jan 6, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/9740 mentions this issue.

@robpike robpike closed this as completed in a63ba85 May 5, 2015
@mikioh mikioh modified the milestones: Go1.5, Unplanned May 15, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

7 participants