common

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonOptions

type CommonOptions struct {
	*cli.CommonOptions // Provides Logger and Workspace fields
	Config             *config.Config
}

CommonOptions provides common options for all commands. It combines golib's cli.CommonOptions with project-specific config. Following golib/cli pattern: commands embed this struct and implement Command interface.

func NewCommonOptions

func NewCommonOptions() *CommonOptions

NewCommonOptions creates a new CommonOptions with initialized config.

func (*CommonOptions) BindFlags

func (o *CommonOptions) BindFlags(fs *pflag.FlagSet)

BindFlags implements cli.Options interface. MUST call embedded CommonOptions.BindFlags first to bind workspace/v flags.

func (*CommonOptions) Complete

func (o *CommonOptions) Complete(cmd *cobra.Command, args []string) error

Complete implements cli.ComplexOptions interface. MUST call embedded CommonOptions.Complete to initialize Logger.

func (*CommonOptions) Validate

func (o *CommonOptions) Validate() error

Validate implements cli.ComplexOptions interface. MUST call embedded CommonOptions.Validate first.

Jump to

Keyboard shortcuts

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