Fix bind_address
This commit is contained in:
@@ -16,7 +16,7 @@ type ListenAddress netip.Addr
|
||||
func (a ListenAddress) MarshalJSON() ([]byte, error) {
|
||||
addr := netip.Addr(a)
|
||||
if !addr.IsValid() {
|
||||
return json.Marshal("")
|
||||
return nil, nil
|
||||
}
|
||||
return json.Marshal(addr.String())
|
||||
}
|
||||
@@ -35,6 +35,10 @@ func (a *ListenAddress) UnmarshalJSON(content []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a ListenAddress) Build() netip.Addr {
|
||||
return (netip.Addr)(a)
|
||||
}
|
||||
|
||||
type NetworkList string
|
||||
|
||||
func (v *NetworkList) UnmarshalJSON(content []byte) error {
|
||||
|
||||
Reference in New Issue
Block a user