I was reading the project source code and found that addr.go functions can be
more readable.
The function resolveIP what it was really doing is rejecting the IP in certain
cases so it's ought to check the IP and return boolean in case it's not a valid
IP. so I rewrote it to do so and then changed the usage. that simplified the
other two functions ResolveAddress and normalizeIP
I was reading the project source code and found that
addr.go
functions can be more readable.The function resolveIP what it was really doing is rejecting the IP in certain cases so it's ought to check the IP and return boolean in case it's not a valid IP. so I rewrote it to do so and then changed the usage. that simplified the other two functions
ResolveAddress
andnormalizeIP