cmd

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

The cmd package is used for Cobra integration.

0.2.4 Created by make-go-github-file.yaml on Mon Oct 23 13:34:41 UTC 2023

Index

Constants

View Source
const (
	Short string = "template-go short description"
	Use   string = "template-go"
	Long  string = `
template-go long description.
    `
)

Variables

View Source
var ContextVariablesForOsArch = []option.ContextVariable{}

RootCmd represents the command.

View Source
var SomethingToSay = option.ContextVariable{
	Arg:     "something-to-say",
	Default: option.OsLookupEnvString("SENZING_TOOLS_SOMETHING_TO_SAY", "Main says 'Hi!'"),
	Envar:   "SENZING_TOOLS_SOMETHING_TO_SAY",
	Help:    "Just a phrase to say [%s]",
	Type:    optiontype.String,
}

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.

func PreRun

func PreRun(cobraCommand *cobra.Command, args []string)

Used in construction of cobra.Command

func RunE

func RunE(_ *cobra.Command, _ []string) error

Used in construction of cobra.Command

func Version

func Version() string

Used in construction of cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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