From a63ba85a9f0a96cdedc58ba8e97615972b555c44 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 5 May 2015 11:05:35 -0700 Subject: [PATCH] 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 --- src/fmt/scan.go | 1 + 1 file changed, 1 insertion(+) 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...) }