root

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdRoot

func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) (*cobra.Command, error)

NewCmdRoot creates the root command for the clawker CLI.

Types

type Alias

type Alias struct {
	// Use sets the command's Use field (required)
	Use string
	// Example optionally replaces the command's Example field (empty preserves original)
	Example string
	// Command is a factory function that creates the target command
	Command func(*cmdutil.Factory) *cobra.Command
}

Alias defines a top-level command alias to a subcommand. This follows Docker's pattern where `docker run` is an alias for `docker container run`. Each alias creates a new command instance from the factory, overriding only Use and optionally Example, while inheriting all other properties (flags, RunE, etc.).

Jump to

Keyboard shortcuts

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