From c91dc6b3fda73cfbe141ab2c853b96890d313d05 Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Mon, 20 Aug 2018 07:37:20 -0700
Subject: [PATCH] More linting

---
 dyndnsd-client.go | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/dyndnsd-client.go b/dyndnsd-client.go
index c24b4f4..7cd62a1 100644
--- a/dyndnsd-client.go
+++ b/dyndnsd-client.go
@@ -57,15 +57,16 @@ func main() {
 
 	// IPv4 is required
 	if ipv4, err := getURL(ipv4Endpoint); err == nil {
-		if ipv4Valid := net.ParseIP(ipv4); ipv4Valid == nil {
+		ipv4Valid := net.ParseIP(ipv4)
+		if ipv4Valid == nil {
 			logger.Println("Invalid IPv4 address returned by endpoint")
 			logger.Printf("%s", err)
 			return
-		} else {
-			query := endpoint.Query()
-			query.Set("myip", ipv4Valid.String())
-			endpoint.RawQuery = query.Encode()
 		}
+
+		query := endpoint.Query()
+		query.Set("myip", ipv4Valid.String())
+		endpoint.RawQuery = query.Encode()
 	} else {
 		logger.Println("Couldn't retrieve IPv4 address")
 		logger.Printf("%s", err)
-- 
GitLab