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

@ -19,7 +19,18 @@ type StructWithoutPtrs struct {
}
type Map struct {
M map[string]int
Int map[string]int
SliceInt map[string][]int
StructWithPtr map[string]*StructWithPtrs
StructWithoutPtr map[string]*StructWithoutPtrs
SlicesWithPtrs map[string][]*StructWithPtrs
SlicesWithoutPtrs map[string][]*StructWithoutPtrs
StructWithoutPtrKey map[StructWithoutPtrs]int `json:"-"`
// Unsupported.
SliceIntPtr map[string][]*int
PointerKey map[*string]int `json:"-"`
StructWithPtrKey map[StructWithPtrs]int `json:"-"`
}
type StructWithPtrs struct {