cmd

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package cmd provides the command-line interface for the Corral application.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the build version of Corral. It is overridden at release time via -ldflags "-X github.com/sebastienrousseau/corral/cmd.Version=<version>" (set by goreleaser) and by `make build` via `git describe`. The "dev" fallback makes an un-injected build obviously local rather than masquerading as a stale release tag.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ExecuteContext added in v0.0.3

func ExecuteContext(ctx context.Context)

ExecuteContext executes the root command with the provided context.

func RootCommand added in v0.0.28

func RootCommand() *cobra.Command

RootCommand returns the fully configured root command.

Exposed so build-time tooling can walk the command tree — scripts/gen_docs.go renders manpages and shell completions from it, which is what keeps both in step with `--help` instead of drifting as hand-written files do. Callers must treat the result as read-only; mutating it changes what the CLI does.

Types

type ExecSummary added in v0.0.14

type ExecSummary struct {
	Total    int
	Failed   int
	Canceled bool
}

ExecSummary is the aggregate outcome of a batch command.

Directories

Path Synopsis
Package main is the entry point for the Corral CLI application.
Package main is the entry point for the Corral CLI application.

Jump to

Keyboard shortcuts

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