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

More linting

parent c406cdfe
No related branches found
No related tags found
1 merge request!1Add CI
Pipeline #208 passed with stages
in 7 minutes and 22 seconds
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment