start json encoding
This commit is contained in:
parent
2fe950d2c3
commit
5c60dc2a2d
5
init.go
5
init.go
@ -5,6 +5,7 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||||
//"github.com/mikioh/ipaddr"
|
//"github.com/mikioh/ipaddr"
|
||||||
@ -25,6 +26,10 @@ func Init() {
|
|||||||
|
|
||||||
fmt.Println(conf.Network.String())
|
fmt.Println(conf.Network.String())
|
||||||
fmt.Printf("%-+v/n",conf)
|
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?)
|
// get a random /22 subnet on 10.0.0.0 (1023 hosts) (or /24?)
|
||||||
|
Loading…
Reference in New Issue
Block a user