]> Cypherpunks repositories - gostls13.git/commitdiff
expvar: slightly expand documentation for Var's String method
authorScott Bell <scott@sctsm.com>
Thu, 19 May 2016 01:44:46 +0000 (18:44 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 19 May 2016 04:20:47 +0000 (04:20 +0000)
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>
src/expvar/expvar.go

index b7ea433014b9dcd43cca532de22890e8ab72041d..d5465c518f81d98b95d8b26370a0c12bbec34bd5 100644 (file)
@@ -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
 }