cmd/viewer,types/views: add support for views of maps

Updates #4635

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-05-09 09:30:39 -07:00
committed by Maisem Ali
parent 5cd56fe8d5
commit d04afc697c
7 changed files with 314 additions and 21 deletions

View File

@@ -531,13 +531,6 @@ type NetInfo struct {
// Update BasicallyEqual when adding fields.
}
// DERPLatencyForEach calls fn for each value in the DERPLatency map.
func (v NetInfoView) DERPLatencyForEach(fn func(k string, v float64)) {
for k, v := range v.ж.DERPLatency {
fn(k, v)
}
}
func (ni *NetInfo) String() string {
if ni == nil {
return "NetInfo(nil)"