command

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBuildInfo

func WithBuildInfo(version, commit, date string) func(app *App)

func WithEngineOptions

func WithEngineOptions(opts ...func(*hookt.Engine)) func(app *App)

Types

type App

type App struct {
	BuildInfo

	Engine *hookt.Engine
	// contains filtered or unexported fields
}

func New

func New(name string, opts ...func(*App)) *App

func (*App) Init

func (app *App) Init(cmd *cobra.Command, args []string)

func (*App) Register

func (app *App) Register(f *pflag.FlagSet)

func (*App) Render

func (app *App) Render(v any) error

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

Jump to

Keyboard shortcuts

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