hooks

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const EnvFile = ".env"

EnvFile is the name of the environment file

Variables

This section is empty.

Functions

func ApplyMiddleware

func ApplyMiddleware(commands []*cli.Command, chain *ActionChain)

func InitVersionCheck added in v0.2.6

func InitVersionCheck(cCtx *cli.Context)

InitVersionCheck starts an async version check for prod builds

func LoadEnvFile

func LoadEnvFile(ctx *cli.Context) error

func WithCommandMetricsContext

func WithCommandMetricsContext(ctx *cli.Context) error

func WithFirstRunSetup

func WithFirstRunSetup(cCtx *cli.Context) error

WithFirstRunSetup handles first-run environment and telemetry setup

func WithMetricEmission

func WithMetricEmission(action cli.ActionFunc) cli.ActionFunc

func WithVersionCheck added in v0.2.6

func WithVersionCheck(action cli.ActionFunc) cli.ActionFunc

Types

type ActionChain

type ActionChain struct {
	Processors []func(action cli.ActionFunc) cli.ActionFunc
}

func NewActionChain

func NewActionChain() *ActionChain

NewActionChain creates a new action chain

func (*ActionChain) Use

func (ac *ActionChain) Use(processor func(action cli.ActionFunc) cli.ActionFunc)

Use appends a new processor to the chain

func (*ActionChain) Wrap

func (ac *ActionChain) Wrap(action cli.ActionFunc) cli.ActionFunc

Jump to

Keyboard shortcuts

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