mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
use newer netip types
This commit is contained in:
parent
d4fc2116b5
commit
627a1105ee
3 changed files with 4 additions and 8 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"net/netip"
|
||||
|
||||
"go4.org/netipx"
|
||||
"nfsense.net/nfsense/internal/definitions/common"
|
||||
)
|
||||
|
||||
type Address struct {
|
||||
|
@ -13,7 +12,7 @@ type Address struct {
|
|||
Comment string `json:"comment,omitempty"`
|
||||
Host *netip.Addr `json:"host,omitempty" validate:"excluded_unless=Type 0"`
|
||||
Range *netipx.IPRange `json:"range,omitempty" validate:"excluded_unless=Type 1"`
|
||||
NetworkAddress *common.IPNet `json:"network,omitempty" validate:"excluded_unless=Type 2"`
|
||||
NetworkAddress *netip.Prefix `json:"network,omitempty" validate:"excluded_unless=Type 2"`
|
||||
Children *[]string `json:"children,omitempty"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue