commands

package
v0.0.0-...-71b52ef Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commander

type Commander struct {
	// contains filtered or unexported fields
}

Commander is the base struct for all commands run through viper CLI This stores the logger and profile. it also stores folder and file path information and provides startup and cleanup methods.

func NewCommander

func NewCommander(context *cli.Context) *Commander

func (*Commander) Cleanup

func (c *Commander) Cleanup()

Cleanup is run after the command has completed This will sync the logger and perform any other cleanup tasks. If an error occurred during the command, it will be logged.

func (*Commander) GetCommonDirs

func (c *Commander) GetCommonDirs() *config.CommonDirs

func (*Commander) GetLogger

func (c *Commander) GetLogger() *zap.Logger

func (*Commander) GetProfile

func (c *Commander) GetProfile() string

func (*Commander) RunProfiler

func (c *Commander) RunProfiler()

RunProfiler runs the profiler on port 6060 This will be used as a flag with any command.

Jump to

Keyboard shortcuts

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