commands

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 70 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrUnknownProjectName signals an unknown project was requested/referred
	ErrUnknownProjectName = errors.New("unknown project name")
)

Functions

func DatatugCommand

func DatatugCommand() *cobra.Command

DatatugCommand builds the `datatug` root command tree.

A bare `datatug` invocation (and any invocation whose first positional argument does not match a registered subcommand) falls through to `ui` — this replicates urfave/cli/v3's DefaultCommand: "ui" behaviour, which took priority over the root's own Action in every case, including when --tui was set (the root Action's TUIFlag.IsSet() check was consequently dead code: DefaultCommand always intercepted execution first). Only the --tui/-t flag surface is preserved here; the root RunE ignores it, exactly as the unreachable original Action's callers never observed it either.

func Exit added in v0.12.0

func Exit(message string, code int) error

Exit returns an error that carries a specific process exit code. Returning it from a command's RunE propagates up to main, which exits with code — the same contract github.com/urfave/cli/v3's cli.Exit provided.

func RegisterAsViewer added in v0.1.0

func RegisterAsViewer()

Types

type Encoder

type Encoder interface {
	Encode(v interface{}) error
}

Encoder defines interface to encode

type ExitCoder added in v0.12.0

type ExitCoder interface {
	error
	ExitCode() int
}

ExitCoder is implemented by an error that must terminate the process with a specific exit code. It is this package's replacement for github.com/urfave/cli/v3's ExitCoder contract, which several mutating commands (db copy, entity authoring, --git mode validation) relied on before the migration to cobra. main() checks for this interface after the root command returns and exits with ExitCode() when present.

type Options

type Options struct {
}

Options defines common options for commands

Jump to

Keyboard shortcuts

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