From: Rob Pike Date: Tue, 5 May 2015 18:05:35 +0000 (-0700) Subject: fmt: document that Scanf returns an error the same as Scan X-Git-Tag: go1.5beta1~746 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a63ba85a9f0a96cdedc58ba8e97615972b555c44;p=gostls13.git fmt: document that Scanf returns an error the same as Scan No semantic change. Fixes #8708. Change-Id: Ieda04a86a19bb69bfc2519d381a2f025e7cb8279 Reviewed-on: https://go-review.googlesource.com/9740 Reviewed-by: Ian Lance Taylor --- diff --git a/src/fmt/scan.go b/src/fmt/scan.go index 93cd553a57..95725303d9 100644 --- a/src/fmt/scan.go +++ b/src/fmt/scan.go @@ -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...) }