From 026656efe45d65b287413c238166d6da9d2db9dd Mon Sep 17 00:00:00 2001 From: Erick Hitter <git-contrib@ethitter.com> Date: Fri, 29 Dec 2017 23:14:06 -0800 Subject: [PATCH] Simplify conditions --- dyndnsd-client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dyndnsd-client.go b/dyndnsd-client.go index 3247e1d..602e8ee 100644 --- a/dyndnsd-client.go +++ b/dyndnsd-client.go @@ -54,8 +54,7 @@ func main() { } // IPv4 is required - ipv4, err := getUrl(ipv4Endpoint) - if err == nil { + if ipv4, err := getUrl(ipv4Endpoint); err == nil { query := endpoint.Query() query.Set("myip", ipv4) endpoint.RawQuery = query.Encode() @@ -66,8 +65,7 @@ func main() { } // IPv6 is optional - ipv6, err := getUrl(ipv6Endpoint) - if err == nil { + if ipv6, err := getUrl(ipv6Endpoint); err == nil { query := endpoint.Query() query.Set("myip6", ipv6) endpoint.RawQuery = query.Encode() -- GitLab