cmd

package
v0.0.0-...-b41f85f Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package cmd provides command line interface for the PR CLI application

Index

Constants

View Source
const (
	SingleCommand  = executor.SingleCommand
	MultiCommand   = executor.MultiCommand
	BuiltInCommand = executor.BuiltInCommand
)
View Source
const (
	ErrUnsupportedCommandType = executor.ErrUnsupportedCommandType
	ErrUnknownCommandType     = executor.ErrUnknownCommandType
)

Error message constants for consistency

View Source
const EnvPrefix = "PR"

EnvPrefix is the prefix for environment variables

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type CommandType

type CommandType = executor.CommandType

Re-export types from executor package for backward compatibility

type PROption

type PROption struct {
	*logrus.Logger
	Config *config.Config
	// contains filtered or unexported fields
}

PROption option for PR CLI command

func NewPROption

func NewPROption() *PROption

NewPROption creates a new PROption instance

func (*PROption) AddFlags

func (p *PROption) AddFlags(flags *pflag.FlagSet)

AddFlags add flags to options

func (*PROption) Run

func (p *PROption) Run(cmd *cobra.Command, args []string) error

Run executes the PR CLI logic

type ParsedCommand

type ParsedCommand = executor.ParsedCommand

Jump to

Keyboard shortcuts

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