ubcli

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogLevelFromString added in v0.0.9

func LogLevelFromString(level string) slog.Level

Types

type CliConfig added in v0.0.9

type CliConfig struct {
	LogLevel string `env:"LOG_LEVEL" default:"info"`
}

type Command

type Command struct {
	Name    string
	Help    string
	Run     func(args []string) error
	FlagSet *flag.FlagSet
}

type CommandLine

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

func NewCommandLine

func NewCommandLine(name string) *CommandLine

func (*CommandLine) Add

func (c *CommandLine) Add(cmd ...Command)

func (*CommandLine) Help

func (c *CommandLine) Help(args []string)

func (*CommandLine) Run

func (c *CommandLine) Run(args []string) error

func (*CommandLine) Usage

func (c *CommandLine) Usage(args []string)

Jump to

Keyboard shortcuts

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