Skip to content

Commit 7c04110

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 66f5d4e commit 7c04110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fmt/scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ func (s *ss) scanRune(bitSize int) int64 {
612612
// scanBasePrefix reports whether the integer begins with a bas prefix
613613
// and returns the base, digit string, and whether a zero was found.
614614
// It is called only if the verb is %v.
615-
func (s *ss) scanBasePrefix() (int, string, bool) {
615+
func (s *ss) scanBasePrefix() (base int, digits string, zeroFound bool) {
616616
if !s.peek("0") {
617617
return 0, decimalDigits + "_", false
618618
}

0 commit comments

Comments
 (0)