From 5c60dc2a2dd4f814d6373baabf2dbd190552d9f5 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Sun, 1 Mar 2020 21:48:24 +0000 Subject: [PATCH] start json encoding --- init.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.go b/init.go index 7239acc..ec53b21 100644 --- a/init.go +++ b/init.go @@ -5,6 +5,7 @@ import ( "math/rand" "fmt" "time" + "encoding/json" "golang.zx2c4.com/wireguard/wgctrl/wgtypes" //"github.com/mikioh/ipaddr" @@ -25,6 +26,10 @@ func Init() { fmt.Println(conf.Network.String()) fmt.Printf("%-+v/n",conf) + + _json, _ := json.MarshalIndent(conf, "", " ") + + fmt.Println(string(_json)) } // get a random /22 subnet on 10.0.0.0 (1023 hosts) (or /24?)