app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorRed    = "\033[0;31m"
	ColorGreen  = "\033[0;32m"
	ColorYellow = "\033[1;33m"
	ColorBlue   = "\033[0;34m"
	ColorCyan   = "\033[0;36m"
	ColorNC     = "\033[0m" // No Color
)

颜色定义

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config        *config.AppConfig
	Log           *logrus.Entry
	OSCommand     *commands.OSCommand
	DockerCommand *commands.DockerCommand
	Tr            *i18n.TranslationSet
	ErrorChan     chan error
	// contains filtered or unexported fields
}

App struct

func NewApp

func NewApp(config *config.AppConfig) (*App, error)

NewApp bootstrap a new application

func (*App) Close

func (app *App) Close() error

func (*App) KnownError

func (app *App) KnownError(err error) (string, bool)

KnownError takes an error and tells us whether it's an error that we know about where we can print a nicely formatted version of it rather than panicking with a stack trace

func (*App) Run

func (app *App) Run() error

func (*App) RunInteractiveCLI

func (app *App) RunInteractiveCLI() error

RunInteractiveCLI runs the application in interactive CLI mode

Jump to

Keyboard shortcuts

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