go/constant: document that Value.String and ExactString return quoted strings
This has always been the case but it was not obvious from the documentation. The reason for the quoting is that String() may return an abbreviated string, starting with double-quote (") but ending in ... (w/o a quote). The missing quote indicates the abbreviation (in contrast to a string ending in ..."). constant.StringVal can be used to obtain the unquoted string of a String Value. Change-Id: Id0ba45b6ff62b3e024386ba8d907d6b3a4fcb6d7 Reviewed-on: https://go-review.googlesource.com/28576Reviewed-by: Alan Donovan <adonovan@google.com>
Showing
Please register or sign in to comment