Skip to content
Snippets Groups Projects
Commit 026656ef authored by Erick Hitter's avatar Erick Hitter
Browse files

Simplify conditions

parent 7554f9f4
Branches
No related tags found
No related merge requests found
...@@ -54,8 +54,7 @@ func main() { ...@@ -54,8 +54,7 @@ func main() {
} }
// IPv4 is required // IPv4 is required
ipv4, err := getUrl(ipv4Endpoint) if ipv4, err := getUrl(ipv4Endpoint); err == nil {
if err == nil {
query := endpoint.Query() query := endpoint.Query()
query.Set("myip", ipv4) query.Set("myip", ipv4)
endpoint.RawQuery = query.Encode() endpoint.RawQuery = query.Encode()
...@@ -66,8 +65,7 @@ func main() { ...@@ -66,8 +65,7 @@ func main() {
} }
// IPv6 is optional // IPv6 is optional
ipv6, err := getUrl(ipv6Endpoint) if ipv6, err := getUrl(ipv6Endpoint); err == nil {
if err == nil {
query := endpoint.Query() query := endpoint.Query()
query.Set("myip6", ipv6) query.Set("myip6", ipv6)
endpoint.RawQuery = query.Encode() endpoint.RawQuery = query.Encode()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment