fix unititialised IPNet marshalling
This commit is contained in:
parent
34ff77b27a
commit
b770d387bf
@ -24,8 +24,12 @@ func (n *JSONIPNet) UnmarshalJSON(b []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (n *JSONIPNet) String() string {
|
func (n *JSONIPNet) String() string {
|
||||||
|
if len(n.IPNet.IP) == 0 {
|
||||||
|
return "\"\""
|
||||||
|
} else {
|
||||||
return n.IPNet.String()
|
return n.IPNet.String()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type JSONKey struct {
|
type JSONKey struct {
|
||||||
Key wgtypes.Key
|
Key wgtypes.Key
|
||||||
|
Loading…
Reference in New Issue
Block a user