PushProx
PushProx copied to clipboard
use the recommended fqdn.FqdnHostname rathen than fqdn.Get
fqdn.Get is deprecated by the author:
// Deprecated: // This function has bad API, works poorly and is replace by // FqdnHostname. Please please do not use it. It will be removed // in the next version.
The old function resolves the FQDN by doing a forward lookup of the hostname, and then a reverse lookup of the IP address. This may lead to surprising results. The new function aims to give the same result as hostname -f.
Another problem with the fqdn.Get API is that it has no facility to return errors. This patch throws away the actual error for simplicity's sake, though.
This needs a DCO sign-off. You can use git commit -s --amend to add it.