aboutsummaryrefslogtreecommitdiff
path: root/src/expvar
diff options
context:
space:
mode:
authorScott Bell <scott@sctsm.com>2016-05-18 18:44:46 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2016-05-19 04:20:47 +0000
commit2a12035f8ec18f0a577853fda78faf2826397131 (patch)
tree626e363b0c4e33a5859156d51ab239f0e50cac5a /src/expvar
parent255e206b2bae9e7632043e08cf8cc0c7ce445c31 (diff)
downloadgo-2a12035f8ec18f0a577853fda78faf2826397131.tar.gz
go-2a12035f8ec18f0a577853fda78faf2826397131.zip
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 <adg@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/expvar')
-rw-r--r--src/expvar/expvar.go2
1 files changed, 2 insertions, 0 deletions
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
}