Skip to content

Remove 'Auto generated by spf13/cobra' message from documentation output - #3

Closed
meekrosoft wants to merge 2 commits into
mainfrom
remove-generated-message
Closed

Remove 'Auto generated by spf13/cobra' message from documentation output#3
meekrosoft wants to merge 2 commits into
mainfrom
remove-generated-message

Conversation

@meekrosoft

Copy link
Copy Markdown
Contributor

No description provided.

-h, --help help for k8s
-i, --id string The unique identifier of the source infrastructure of the report (e.g. the K8S cluster/namespace name). If not set, it is defaulted to environment name.
-k, --kubeconfig string The kubeconfig path for the target cluster. (default "$HOME/.kube/config")
-k, --kubeconfig string The kubeconfig path for the target cluster. (default "/Users/mikelong/.kube/config")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is auto generated maybe we don't need to care about that, but how did your $HOME ended up here?? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting...I've no idea actually

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted this manually, but we should figure out if there is a better way than manually doing this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default path is generated dynamically when the binary runs (and docs are generated by running a command from the binary). That's fine for the help text because you get a personalized default printed. But we need to make sure it's left as $HOME when we generate docs. We can set a DEV env variable in the make file and don't find the actual home dir when that variable is set to true.

@ewelinawilkosz ewelinawilkosz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except the one comment about a path in generated file it looks good

Comment thread cmd/reporter/root.go
Long: globalUsage,
SilenceUsage: true,
TraverseChildren: true,
DisableAutoGenTag: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only line you need to disable the autogen tag. Since this is the root command, all others will respect this without explicitly setting it on each of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants