use the recommended fqdn.FqdnHostname rathen than fqdn.Get#147
Open
kjetilho wants to merge 2 commits intoprometheus-community:masterfrom
Open
use the recommended fqdn.FqdnHostname rathen than fqdn.Get#147kjetilho wants to merge 2 commits intoprometheus-community:masterfrom
kjetilho wants to merge 2 commits intoprometheus-community:masterfrom
Conversation
SuperQ
reviewed
Apr 26, 2023
Contributor
|
This needs a DCO sign-off. You can use |
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. Signed-off-by: Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
make usage message more generic. Co-authored-by: Ben Kochie <superq@gmail.com> Signed-off-by: Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.