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 <iant@golang.org>
diff --git a/src/fmt/scan.go b/src/fmt/scan.go
index 93cd553..9572530 100644
--- a/src/fmt/scan.go
+++ b/src/fmt/scan.go
@@ -81,6 +81,7 @@
// 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...)
}