cmd

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package cmd implements console commands

Index

Constants

View Source
const (
	Yes = "yes"
	No  = "no"
)

Various command flags/UI things

Variables

This section is empty.

Functions

func CleanupContext added in v0.9.1

func CleanupContext()

CleanupContext does partial shutdown of context

func GetContext added in v1.2.0

func GetContext() *ctx.AptlyContext

GetContext gives access to the context

func InitContext

func InitContext(flags *flag.FlagSet) error

InitContext initializes context with default settings

func ListPackagesRefList

func ListPackagesRefList(reflist *deb.PackageRefList, collectionFactory *deb.CollectionFactory) (err error)

ListPackagesRefList shows list of packages in PackageRefList

func LookupOption added in v0.9.1

func LookupOption(defaultValue bool, flags *flag.FlagSet, name string) (result bool)

LookupOption checks boolean flag with default (usually config) and command-line setting

func PrintPackageList added in v0.9.6

func PrintPackageList(result *deb.PackageList, format, prefix string) error

PrintPackageList shows package list with specified format or default representation

func RootCommand

func RootCommand() *commander.Command

RootCommand creates root command in command tree

func Run added in v0.9.1

func Run(cmd *commander.Command, cmdArgs []string, initContext bool) (returnCode int)

Run runs single command starting from root cmd with args, optionally initializing context

func ShutdownContext

func ShutdownContext()

ShutdownContext shuts context down

Types

This section is empty.

Jump to

Keyboard shortcuts

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