cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cli is responsible for managing the command-line interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootCommand

type RootCommand struct {
	*cobra.Command
	// contains filtered or unexported fields
}

RootCommand is the root command of the application.

func NewRootCommand

func NewRootCommand() *RootCommand

NewRootCommand creates and initializes a new RootCommand object.

func (*RootCommand) GetCommandLineFlags

func (c *RootCommand) GetCommandLineFlags(cmd *cobra.Command) map[string]bool

GetCommandLineFlags returns a map of all global and command-specified flags passed via the command line.

If a flag was not passed, it will not be present in the map. This will allow the caller to quickly determine whether or not a flag was specified on the command line rather than having to traverse an entire array.

The boolean value the flag is mapped to will always be true.

func (*RootCommand) GetExitCode

func (c *RootCommand) GetExitCode() int

GetExitCode retrieves the exit code for the application.

func (*RootCommand) SetExitCode

func (c *RootCommand) SetExitCode(code int)

SetExitCode sets the exit code for the application.

Directories

Path Synopsis
commands
run
Package run implements the "run" command.
Package run implements the "run" command.
version
Package version implements the "version" command.
Package version implements the "version" command.

Jump to

Keyboard shortcuts

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