1
0
Fork 0
mirror of https://gitlab.com/pnx-tools/dns-updater.git synced 2026-06-16 05:54:56 +02:00
dns-updater/ip/internal/ip.go
2023-12-07 19:45:29 +01:00

15 lines
217 B
Go

package internal
import "net"
func ParseIP(s string) (net.IP, error) {
var err error = nil
ip := net.ParseIP(s)
if ip == nil {
err = &net.ParseError{
Type: "IP address",
Text: s,
}
}
return ip, err
}