cli

package
v0.0.0-...-06b3c08 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 44 Imported by: 1

Documentation

Index

Constants

View Source
const MFG_DEFAULT_DIR string = "mfgs"
View Source
const TARGET_DEFAULT_DIR string = "targets"
View Source
const TARGET_KEYWORD_ALL string = "all"
View Source
const TARGET_TEST_NAME = "unittest"

Variables

View Source
var NewTypeStr = "pkg"

Functions

func AddBuildCommands

func AddBuildCommands(cmd *cobra.Command)

func AddCompleteCommands

func AddCompleteCommands(cmd *cobra.Command)

func AddDocsCommands

func AddDocsCommands(cmd *cobra.Command)

func AddImageCommands

func AddImageCommands(cmd *cobra.Command)

func AddManCommands

func AddManCommands(cmd *cobra.Command)

func AddMfgCommands

func AddMfgCommands(cmd *cobra.Command)

func AddPackageCommands

func AddPackageCommands(cmd *cobra.Command)

func AddProjectCommands

func AddProjectCommands(cmd *cobra.Command)

func AddRunCommands

func AddRunCommands(cmd *cobra.Command)

func AddTabCompleteFn

func AddTabCompleteFn(cmd *cobra.Command, cb TabCompleteFn)

func AddTargetCommands

func AddTargetCommands(cmd *cobra.Command)

func AddValsCommands

func AddValsCommands(cmd *cobra.Command)

func FormatHelp

func FormatHelp(text string) string

Display help text with a max line width of 79 characters

func GenerateTabCompleteValues

func GenerateTabCompleteValues()

func NewtUsage

func NewtUsage(cmd *cobra.Command, err error)

func PackageNameList

func PackageNameList(pkgs []*pkg.LocalPackage) string

func PromptYesNo

func PromptYesNo(dflt bool) bool

func ResetGlobalState

func ResetGlobalState() error

func ResolveMfgPkg

func ResolveMfgPkg(pkgName string) (*pkg.LocalPackage, error)

func ResolveNewTargetName

func ResolveNewTargetName(name string) (string, error)

func ResolvePackages

func ResolvePackages(pkgNames []string) ([]*pkg.LocalPackage, error)

func ResolveRpkgs

func ResolveRpkgs(res *resolve.Resolution, pkgNames []string) (
	[]*resolve.ResolvePackage, error)

func ResolveTarget

func ResolveTarget(name string) *target.Target

func ResolveTargetOrUnittest

func ResolveTargetOrUnittest(pkgName string) (
	*target.Target, *pkg.LocalPackage, error)

@return Target @return LocalPackage The package under test, if any. @return error

func ResolveTargets

func ResolveTargets(names ...string) ([]*target.Target, error)

func ResolveTargetsOrAll

func ResolveTargetsOrAll(names ...string) ([]*target.Target, bool, error)

Resolves a list of target names and checks for the optional "all" keyword among them. Regardless of whether "all" is specified, all target names must be valid, or an error is reported.

@return targets, all (t/f), err

func ResolveUnittest

func ResolveUnittest(pkgName string) (*target.Target, error)

func TargetBuilderForTargetOrUnittest

func TargetBuilderForTargetOrUnittest(pkgName string) (
	*builder.TargetBuilder, error)

func TryGetOrDownloadProject

func TryGetOrDownloadProject() *project.Project

func TryGetProject

func TryGetProject() *project.Project

func VarTypes

func VarTypes() []string

func VarValues

func VarValues(varName string) ([]string, error)

Returns a slice of valid values for the target variable with the specified name. If an invalid target variable is specified, an error is returned.

Types

type TabCompleteFn

type TabCompleteFn func() []string

Jump to

Keyboard shortcuts

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