From 1da6b2ea197c9fcaa50e9465f3bf40c78b14703c Mon Sep 17 00:00:00 2001 From: Nodir Turakulov Date: Fri, 16 Oct 2015 01:33:28 -0700 Subject: [PATCH] fmt: clarify reflect.Value printing fmt docs say: If the operand is a reflect.Value, the concrete value it holds is printed as if it was the operand. It implies recursive application of this rule, which is not the case. Clarify the docs. Change-Id: I019277c7c6439095bab83e5536aa06403638aa51 Reviewed-on: https://go-review.googlesource.com/15952 Reviewed-by: Ian Lance Taylor --- src/fmt/doc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fmt/doc.go b/src/fmt/doc.go index 20a09c5f5b..4eea48eb6b 100644 --- a/src/fmt/doc.go +++ b/src/fmt/doc.go @@ -138,8 +138,8 @@ formatting considerations apply for operands that implement certain interfaces. In order of application: - 1. If the operand is a reflect.Value, the concrete value it - holds is printed as if it was the operand. + 1. If the operand is a reflect.Value, the operand is replaced by the + concrete value that it holds, and printing continues with the next rule. 2. If an operand implements the Formatter interface, it will be invoked. Formatter provides fine control of formatting.