From: Russ Cox Date: Thu, 7 Mar 2019 03:24:54 +0000 (-0500) Subject: fmt: put back named results in ss.scanBasePrefix X-Git-Tag: go1.13beta1~1047 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7c04110c5203c4502d4c23f1464acb9f07f8bb6b;p=gostls13.git fmt: put back named results in ss.scanBasePrefix CL 165619 removed these names when it removed the use of the plain 'return'. But the names help for documentation purposes even without being mentioned directly in the function, so removing them makes the code less readable. Put them back. I renamed found to zeroFound to make the meaning clearer. Change-Id: I1010931f08290af0b0ede7d21b1404c2eea196a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/165899 Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/fmt/scan.go b/src/fmt/scan.go index fe6cbd477f..4554f17300 100644 --- a/src/fmt/scan.go +++ b/src/fmt/scan.go @@ -612,7 +612,7 @@ func (s *ss) scanRune(bitSize int) int64 { // scanBasePrefix reports whether the integer begins with a bas prefix // and returns the base, digit string, and whether a zero was found. // It is called only if the verb is %v. -func (s *ss) scanBasePrefix() (int, string, bool) { +func (s *ss) scanBasePrefix() (base int, digits string, zeroFound bool) { if !s.peek("0") { return 0, decimalDigits + "_", false }