app

package
v0.0.0-...-473e3f1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package app defines an application framework used to create application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBaseName

func FormatBaseName(basename string) string

Types

type App

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

func NewApp

func NewApp(name, basename string, opts ...Option) *App

func (*App) Run

func (a *App) Run()

type Option

type Option func(*App)

func WithDescription

func WithDescription(commandDesc string) Option

func WithOptions

func WithOptions(opt Optioners) Option

func WithRunFunc

func WithRunFunc(runFunc RunFunc) Option

type Optioners

type Optioners interface {
	Validate() []error
}

type RunFunc

type RunFunc func(basename string) error

RunFunc defines the application's startup callback function.

Jump to

Keyboard shortcuts

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