Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: go-md2man does not handle node type HTMLSpan #1137

Closed
MichaelMure opened this issue Jun 14, 2020 · 3 comments
Closed

WARNING: go-md2man does not handle node type HTMLSpan #1137

MichaelMure opened this issue Jun 14, 2020 · 3 comments

Comments

@MichaelMure
Copy link
Contributor

When generating Markdown documentation for https://github.com/MichaelMure/git-bug, I get this warning: WARNING: go-md2man does not handle node type HTMLSpan

My understanding is that it's because I'm using <arg> in Command.Use to indicate an argument, in addition to [] to indicate an optional element:

var pushCmd = &cobra.Command{
	Use:     "push [<remote>]",
	Short:   "Push bugs update to a git remote.",
	PreRunE: loadRepo,
	RunE:    runPush,
}

Could you clarify what is the expected format for Command.Use if any ?

@jpmcb
Copy link
Collaborator

jpmcb commented Aug 10, 2020

I would consider using only brackets [ some-command ] as a best practice. So instead, I would do:

Use:     "push [remote]",

This is a really good reference for command line usage syntax: https://www.ibm.com/support/knowledgecenter/SSZJPZ_8.5.0/com.ibm.swg.im.iis.common.doc/common/command_conventions.html

Going to go ahead and close this as the error from go-md2man is not unexpected

@jpmcb jpmcb closed this as completed Aug 10, 2020
@MichaelMure
Copy link
Contributor Author

Ha thanks.

Would you consider having those rules in the documentation or in the code for the next person?

@jpmcb
Copy link
Collaborator

jpmcb commented Aug 12, 2020

Not a bad idea! If you'd like to open a PR for that, feel free to tag me and I will review 🙏

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

No branches or pull requests

2 participants