cmdutil

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSilent mirrors gh's sentinel used to suppress error printing.
	ErrSilent = errors.New("silent")
)

Functions

This section is empty.

Types

type ExitError

type ExitError struct {
	Code int
	Msg  string
}

ExitError wraps an exit code and optional message.

func (*ExitError) Error

func (e *ExitError) Error() string

type Factory

type Factory struct {
	AppVersion     string
	ExecutableName string

	IOStreams *iostreams.IOStreams

	Config        func() (*config.Config, error)
	JenkinsClient func(context.Context, string, ...jenkins.ClientOption) (*jenkins.Client, error)
	// contains filtered or unexported fields
}

Factory wires together shared services used by Cobra commands. It mirrors the GitHub CLI structure but swaps in Jenkins aware components.

func (*Factory) Client

func (f *Factory) Client(ctx context.Context, contextName string, opts ...jenkins.ClientOption) (*jenkins.Client, error)

Client returns a Jenkins client for the requested context.

func (*Factory) ResolveConfig

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

ResolveConfig eagerly loads the CLI configuration, caching the result.

func (*Factory) Streams

func (f *Factory) Streams() (*iostreams.IOStreams, error)

Streams returns the IO streams, initialising them lazily.

Jump to

Keyboard shortcuts

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