Documentation
¶
Overview ¶
Package cll provides utilities for building CLI applications with urfave/cli/v3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvWithPrefix ¶
func EnvWithPrefix(prefix string) func(strs ...string) cli.ValueSourceChain
EnvWithPrefix returns a function that creates environment variable sources with a consistent prefix. This is useful for namespacing all environment variables for an application.
Example:
env := cll.EnvWithPrefix("MYAPP_")
flag := &cli.StringFlag{
Name: "config",
Sources: env("CONFIG", "CONFIG_PATH"), // reads MYAPP_CONFIG, MYAPP_CONFIG_PATH
}
func Register ¶
func Register(root *cli.Command, subs ...Registerable) *cli.Command
Register chains multiple Registerable implementations onto a root command. Each Registerable is applied in order, allowing modular composition of CLI structure.
Example:
root := &cli.Command{Name: "app"}
root = cll.Register(root, generateCmd, brewCmd, runCmd)
Types ¶
Click to show internal directories.
Click to hide internal directories.