From: Scott Bell Date: Thu, 19 May 2016 01:44:46 +0000 (-0700) Subject: expvar: slightly expand documentation for Var's String method X-Git-Tag: go1.7beta1~157 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2a12035f8ec18f0a577853fda78faf2826397131;p=gostls13.git expvar: slightly expand documentation for Var's String method Fixes #15088. Change-Id: I7727829a4062e15c0e5e3beff4d0bfc1fa327b0f Reviewed-on: https://go-review.googlesource.com/23232 Reviewed-by: Andrew Gerrand Reviewed-by: Brad Fitzpatrick --- diff --git a/src/expvar/expvar.go b/src/expvar/expvar.go index b7ea433014..d5465c518f 100644 --- a/src/expvar/expvar.go +++ b/src/expvar/expvar.go @@ -39,6 +39,8 @@ import ( // Var is an abstract type for all exported variables. type Var interface { // String returns a valid JSON value for the variable. + // Types with String methods that do not return valid JSON + // (such as time.Time) must not be used as a Var. String() string }