IsIPAddress returns true if ip is ipv4 or ipv6 address
(ip string)
| 141 | |
| 142 | // IsIPAddress returns true if ip is ipv4 or ipv6 address |
| 143 | func IsIPAddress(ip string) bool { |
| 144 | if net.ParseIP(ip) != nil { |
| 145 | return true |
| 146 | } |
| 147 | return false |
| 148 | } |
| 149 | |
| 150 | // GrepStringInBuffer finds strings that match needle |
| 151 | func GrepStringInBuffer(buffer string, needle string) []string { |
no outgoing calls