]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: document that Scanf returns an error the same as Scan
authorRob Pike <r@golang.org>
Tue, 5 May 2015 18:05:35 +0000 (11:05 -0700)
committerRob Pike <r@golang.org>
Tue, 5 May 2015 19:48:50 +0000 (19:48 +0000)
No semantic change.

Fixes #8708.

Change-Id: Ieda04a86a19bb69bfc2519d381a2f025e7cb8279
Reviewed-on: https://go-review.googlesource.com/9740
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/fmt/scan.go

index 93cd553a57565302aa10138ffc637aa3770e5f3e..95725303d92b6c4aafa4fb01397c7eff479746b4 100644 (file)
@@ -81,6 +81,7 @@ func Scanln(a ...interface{}) (n int, err error) {
 // Scanf scans text read from standard input, storing successive
 // space-separated values into successive arguments as determined by
 // the format.  It returns the number of items successfully scanned.
+// If that is less than the number of arguments, err will report why.
 func Scanf(format string, a ...interface{}) (n int, err error) {
        return Fscanf(os.Stdin, format, a...)
 }