cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIConfig

type CLIConfig[T c.Validatable] struct {
	ConfigFile *c.ConfigFile[T]
	Command    *cli.Command
}

CLIConfig groups the configuration file and CLI command for configuration management.

func NewCLIConfig

func NewCLIConfig[T c.Validatable](configFile *c.ConfigFile[T]) (*CLIConfig[T], error)

NewCLIConfig builds a CLI configuration helper for the provided application. When configFile is nil a default config file is built using the supplied options. The application name defaults to the executable name but can be overridden with config.WithAppName.

func (*CLIConfig[T]) AddSubcommands

func (c *CLIConfig[T]) AddSubcommands(commands ...*cli.Command)

AddSubcommands appends additional CLI commands under the "conf" namespace.

func (*CLIConfig[T]) Attach

func (c *CLIConfig[T]) Attach(app *cli.Command)

Attach registers the configuration command into the provided CLI application.

Jump to

Keyboard shortcuts

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