Commit 1da6b2ea authored by Nodir Turakulov's avatar Nodir Turakulov Committed by Ian Lance Taylor

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/15952Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 17a256bf
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment