AF returns the address family of a seesaw IP address.
()
| 250 | |
| 251 | // AF returns the address family of a seesaw IP address. |
| 252 | func (ip IP) AF() AF { |
| 253 | if ip.IP().To4() != nil { |
| 254 | return IPv4 |
| 255 | } |
| 256 | return IPv6 |
| 257 | } |
| 258 | |
| 259 | // String returns the string representation of an IP address. |
| 260 | func (ip IP) String() string { |
no test coverage detected