Documentation
¶
Overview ¶
Package ipnet wraps net.IPNet to get CIDR serialization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPNet ¶
type IPNet struct {
net.IPNet
}
IPNet is an IP address in CIDR notation Schema type is `string`
func MustParseCIDR ¶
func MustParseCIDR(s string) *IPNet
MustParseCIDR parses a CIDR from its string representation. If the parse fails, the function will panic.
func ParseCIDR ¶
func ParseCIDR(s string) (*IPNet, error)
ParseCIDR parses a CIDR from its string representation.
func (*IPNet) DeepCopy ¶
func (ipnet *IPNet) DeepCopy() *IPNet
DeepCopy copies the receiver, creating a new IPNet.
func (*IPNet) DeepCopyInto ¶
func (ipnet *IPNet) DeepCopyInto(out *IPNet)
DeepCopyInto copies the receiver into out. out must be non-nil.
func (IPNet) MarshalJSON ¶
func (ipnet IPNet) MarshalJSON() (data []byte, err error)
MarshalJSON interface for an IPNet
func (*IPNet) String ¶
func (ipnet *IPNet) String() string
String returns a CIDR serialization of the subnet, or an empty string if the subnet is nil.
func (*IPNet) UnmarshalJSON ¶
func (ipnet *IPNet) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON interface for an IPNet
Click to show internal directories.
Click to hide internal directories.