// 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.
fqdn.Get is deprecated by the author:
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.