app

package
v0.9.6-beta Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitWhenError

func ExitWhenError(code int, err error)

ExitWhenError prints an error message and exits the application with ErrorCode: code

Types

type CLI

type CLI interface {
	ConfigGetter
	ConfigUpdater
	PatherGetter
	Name() string
	Version() string
	ConfigFileName() string
}

func GetCLI

func GetCLI() CLI

GetCLI returns the global CLI

func GetOrCreateCLI

func GetOrCreateCLI(globalFlags GlobalFlags, args []string) CLI

type ConfigGetter

type ConfigGetter interface {
	GetConfig() (cfg *config.DevCtlConfig, err error)
	MustGetConfig() (cfg *config.DevCtlConfig)
}

type ConfigUpdater

type ConfigUpdater interface {
	UpdateConfig(cfg *config.DevCtlConfig) (err error)
}

type GlobalFlags

type GlobalFlags struct {
	// Verbose is whether to log debug statements.
	Verbose bool

	// Config is the path the the DevCtlConfig file
	Config string

	// AppVersion is the semver of the devctl binary
	AppVersion string
}

type PatherGetter

type PatherGetter interface {
	GetPather() devctlpath.Pather
}

Jump to

Keyboard shortcuts

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