help

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommonBuyFlags

func AddCommonBuyFlags(cmd *cobra.Command)

AddCommonBuyFlags adds common flags for buy commands.

func AddCommonUpdateFlags

func AddCommonUpdateFlags(cmd *cobra.Command)

AddCommonUpdateFlags adds common flags for update commands.

func MarkFlagsRequired

func MarkFlagsRequired(cmd *cobra.Command, flags []string) error

MarkFlagsRequired marks a list of flags as required for a command

Types

type CommandHelpBuilder

type CommandHelpBuilder struct {
	CommandName    string
	ShortDesc      string
	LongDesc       string
	Examples       []string
	RequiredFlags  map[string]string // flag name -> description
	OptionalFlags  map[string]string // flag name -> description
	JSONExamples   []string
	ImportantNotes []string
	DisableColor   bool // Whether to disable colored output
}

CommandHelpBuilder helps construct formatted help text for commands

func (*CommandHelpBuilder) Build

func (b *CommandHelpBuilder) Build(rootCmd *cobra.Command) string

Build constructs the full formatted help text

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL