Closed pehlicd closed 4 months ago
@pehlicd Perfect, thanks for the contribution. I have noticed this but did not get around to fixing it just yet. In addition to the fix you provide here, we should also update the help message, as more commands have been added to netfetch since this.
Hey @deggja, it is a pleasure to contribute to your project. What commands have been added, could you provide me with more info on this? Also, since the project uses cobra, there is no need to manually update the help messages as they are all automatically generated by the cobra package.
Hey @deggja, it is a pleasure to contribute to your project. What commands have been added, could you provide me with more info on this? Also, since the project uses cobra, there is no need to manually update the help messages as they are all automatically generated by the cobra package.
I had no idea Cobra did that to be fair. Regarding the missing commands/flags:
It is possible to scan for both native k8s network policies when running netfetch scan
by adding the flags --native
and --cilium
. I also just recently started adding the possibility to scan a specific policy by using the --target
flag.
However, it seems like Cobra adds all this by default. Again, I had no clue. Which means thats already taken care off and you can disregard my previous comment.
You can find the related documentation in https://github.com/spf13/cobra/blob/main/site/content/user_guide.md#help-command also for the recently added flags they are also included in the help message as well you can find them by running netfetch scan --help
. The reason that these flags are not shown in when help flag called in root command because the flags are specific to commands and subcommands 🙂
Hey,
First of all thanks for building such a good project. When I installed the netfetch and ran the help command I saw that the usage help message is duplicated as cobra generates it itself by default and this PR aims to refactor it.
Current version of the netfetch help message:
Updated version: