mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-07 18:31:49 +01:00
cmd/vet: move jsontags into vet (#17777)
The cmd/jsontags is non-idiomatic since it is not a main binary. Move it to a vet directory, which will eventually contain a vettool binary. Update tailscale/corp#791 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
parent
77123a569b
commit
446752687c
@ -28,9 +28,9 @@ var jsontagsAllowlist map[ReportKind]set.Set[string]
|
||||
//
|
||||
// The struct type name may be "*" for anonymous struct types such
|
||||
// as those declared within a function or as a type literal in a variable.
|
||||
func ParseAllowlist(b []byte) map[ReportKind]set.Set[string] {
|
||||
func ParseAllowlist(s string) map[ReportKind]set.Set[string] {
|
||||
var allowlist map[ReportKind]set.Set[string]
|
||||
for line := range strings.SplitSeq(string(b), "\n") {
|
||||
for line := range strings.SplitSeq(s, "\n") {
|
||||
kind, field, _ := strings.Cut(strings.TrimSpace(line), "\t")
|
||||
if allowlist == nil {
|
||||
allowlist = make(map[ReportKind]set.Set[string])
|
||||
Loading…
x
Reference in New Issue
Block a user