cobra icon indicating copy to clipboard operation
cobra copied to clipboard

remove unneeded error from printOption method

Open t0t07 opened this issue 3 years ago • 6 comments

The code below doesn't really need the error as return type, so I remove it

func printOptions(buf *bytes.Buffer, cmd *cobra.Command, name string) error {
	flags := cmd.NonInheritedFlags()
	flags.SetOutput(buf)
	if flags.HasAvailableFlags() {
		parentFlags.PrintDefaults()
		buf.WriteString("```\n\n")
	}
	return nil
}

t0t07 avatar Dec 02 '21 02:12 t0t07

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 02 '21 02:12 CLAassistant

@jpmcb Hi John, do you mind taking a quick look at this PR? Should be a fairly straightforward fix :) Thanks!

t0t07 avatar Dec 19 '21 05:12 t0t07

Can you add a description to this PR please? Thanks much!!

jpmcb avatar Dec 20 '21 23:12 jpmcb

@jpmcb Added. Thanks!

t0t07 avatar Dec 21 '21 00:12 t0t07

This PR is being marked as stale due to a long period of inactivity

github-actions[bot] avatar Feb 20 '22 00:02 github-actions[bot]

we probably still want this - reopening and marking myself as reviewer

jpmcb avatar Mar 26 '22 15:03 jpmcb