From 2a12035f8ec18f0a577853fda78faf2826397131 Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Wed, 18 May 2016 18:44:46 -0700 Subject: [PATCH] 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 --- src/expvar/expvar.go | 2 ++ 1 file changed, 2 insertions(+) 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 } -- 2.48.1