mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-23 03:17:43 +00:00
tsweb: add VarzHandler tests
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
a4e19f2233
commit
5f45d8f8e6
@@ -424,11 +424,13 @@ func VarzHandler(w http.ResponseWriter, r *http.Request) {
|
||||
})
|
||||
}
|
||||
}
|
||||
expvar.Do(func(kv expvar.KeyValue) {
|
||||
expvarDo(func(kv expvar.KeyValue) {
|
||||
dump("", kv)
|
||||
})
|
||||
}
|
||||
|
||||
var expvarDo = expvar.Do // pulled out for tests
|
||||
|
||||
func writeMemstats(w io.Writer, ms *runtime.MemStats) {
|
||||
out := func(name, typ string, v uint64, help string) {
|
||||
if help != "" {
|
||||
|
Reference in New Issue
Block a user