mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
types/logger: add AsJSON
Printing out JSON representation things in log output is pretty common. Updates #cleanup Change-Id: Ife2d2e321a18e6e1185efa8b699a23061ac5e5a4 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
a79b1d23b8
commit
590c693b96
@@ -4,7 +4,6 @@
|
||||
package ipnlocal
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os/user"
|
||||
"strconv"
|
||||
@@ -312,10 +311,6 @@ func TestProfileDupe(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func asJSON(v any) []byte {
|
||||
return must.Get(json.MarshalIndent(v, "", " "))
|
||||
}
|
||||
|
||||
// TestProfileManagement tests creating, loading, and switching profiles.
|
||||
func TestProfileManagement(t *testing.T) {
|
||||
store := new(mem.Store)
|
||||
|
Reference in New Issue
Block a user