9 lines
166 B
Go
9 lines
166 B
Go
package ipv4
|
|
|
|
import "net"
|
|
|
|
// IsValid return true if the given IP is a valid IP, false otherwise
|
|
func IsValid(ipv4 string) bool {
|
|
return net.ParseIP(ipv4) != nil
|
|
}
|