From 984a6992192c9dea5ec797fec0fd4ab8591f39be Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 1 Jun 2020 11:15:39 -0700 Subject: [PATCH] cmd/tailscale: warn to stderr that netcheck -format=json isn't stable --- cmd/tailscale/netcheck.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/tailscale/netcheck.go b/cmd/tailscale/netcheck.go index 158e71c1a..5d64495cc 100644 --- a/cmd/tailscale/netcheck.go +++ b/cmd/tailscale/netcheck.go @@ -12,6 +12,7 @@ import ( "log" "os" "sort" + "strings" "time" "github.com/peterbourgon/ff/v2/ffcli" @@ -53,6 +54,10 @@ func runNetcheck(ctx context.Context, args []string) error { c.Logf = logger.Discard } + if strings.HasPrefix(netcheckArgs.format, "json") { + fmt.Fprintln(os.Stderr, "# Warning: this JSON format is not yet considered a stable interface") + } + dm := derpmap.Prod() for { t0 := time.Now()