Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IP ¶
IP represent an IP and an optional netmask/size. It is provided because while net/IP provides much of what is needed for marshalling to/from text and json, it doesn't provide a convenient netmask. And it doesn't implement database/sql's Scanner either. This type implements both MarshalText/UnmarshalText and Scan(), and to top it off: String(). this should ensure maximum usability.
func (IP) MarshalText ¶
MarshalText returns a text version of an ip using String, it is used by various encoders, including the JSON encoder.
func (*IP) String ¶
String returns a ip address in string format, with an optional /mask if the IP has a non-zero mask.
func (*IP) UnmarshalText ¶
UnmarshalText parses a byte string onto an IP structure. It is used by various encoders, including the JSON encoder.