cmdutil

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJSON

func IsJSON(cmd *cli.Command) bool

IsJSON returns true if the output format is JSON.

func OutputFlag

func OutputFlag() *cli.StringFlag

OutputFlag returns the standard --output flag for use in commands.

Types

type Factory

type Factory struct {
	ConfigPath string
	Debug      bool
	// contains filtered or unexported fields
}

Factory provides shared dependencies to all commands.

func (*Factory) Client

func (f *Factory) Client() (*api.Client, error)

Client returns an API client, creating one if needed.

func (*Factory) Config

func (f *Factory) Config() (*config.Config, error)

Config returns the loaded configuration, caching after first load.

Jump to

Keyboard shortcuts

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