This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
Fixes #900: Removes '0' from the list of valid ports #972
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.
Fixes #900
Summary of changes:
snapd
starts up so there is no need to display the port that was chosen in the log file)flags.go
file for that package rather than having the command-line flags for the options from some packages set in a package-levelflags.go
file and while the command-line flags for the options for other packages are set in thesnapd.go
file--help
output forsnapd
(rather than displaying values like '0' for command-line options like the--api-port
)Testing done:
snapd
with theport
set to zero in the global configuration file and observing the error that results, then by starting it with a non-zero port in that same configuration file and observing the successful startup. Also ensured that the--help
output forsnapd
could be generated successfully with the refactored command-line option code in this PR.@intelsdi-x/snap-maintainers