common

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown = "unknown"
	Latest  = "latest"

	Warn   = "warn"
	Error  = "error"
	Ignore = "ignore"
)
View Source
const (
	OutputAuto    = "auto"
	OutputSpinner = "spinner"
	OutputText    = "text"
	OutputJSON    = "json"
)

Variables

View Source
var BRANCH = "dev"

BRANCH of the Version

View Source
var COMMIT = "dirty"
View Source
var NAME = "distillery"

NAME of the App

View Source
var SUMMARY = "v1.0.0"

SUMMARY of the Version

View Source
var VERSION = "1.0.0"

VERSION of Release

Functions

func Before

func Before(ctx context.Context, c *cli.Command) (context.Context, error)

func Flags

func Flags() []cli.Flag

func GetCommand added in v1.3.0

func GetCommand(name string) *cli.Command

func GetCommands

func GetCommands() []*cli.Command

GetCommands -- retrieves all commands assigned to the main group

func RegisterCommand

func RegisterCommand(command *cli.Command)

RegisterCommand -- allows you to register a command under the main group

func WaitForOutput added in v1.10.0

func WaitForOutput()

WaitForOutput blocks until any active spinner output completes. If the spinner was never used (no messages sent), it is stopped immediately.

Types

type AppVersionInfo

type AppVersionInfo struct {
	Name    string
	Version string
	Branch  string
	Summary string
	Commit  string
}

AppVersionInfo --

var AppVersion AppVersionInfo

AppVersion --

Jump to

Keyboard shortcuts

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