go1.20.5
GoThrough

expvar.Var

// 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 }

expvar.Do

// Do calls f for each exported variable. // The global variable map is locked during the iteration, // but existing entries may be concurrently updated. func Do(f func(KeyValue))

expvar.Get

// Get retrieves a named exported variable. It returns nil if the name has // not been registered. func Get(name string) Var

expvar.Handler

// Handler returns the expvar HTTP Handler. // // This is only needed to install the handler in a non-standard location. func Handler() http.Handler

expvar.NewFloat

func NewFloat(name string) *Float

expvar.NewInt

func NewInt(name string) *Int

expvar.NewMap

func NewMap(name string) *Map

expvar.NewString

func NewString(name string) *String

expvar.Publish

// Publish declares a named exported variable. This should be called from a // package's init function when it creates its Vars. If the name is already // registered then this will log.Panic. func Publish(name string, v Var)