cmd

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApp

func NewApp(build BuildInfo) *cli.Command

func Run

func Run(ctx context.Context, args []string, frontend fs.FS, build BuildInfo) error

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string

	// BruinPath is the bruin binary every query runs through. Empty means
	// "bruin" looked up on PATH. Set from DAC_BRUIN_PATH.
	BruinPath string

	// BruinHost marks dac as launched by the bruin CLI as `bruin dac`. It
	// hides the upgrade/update and version commands and the --version flag,
	// and names the program `bruin dac` in help and in commands dac tells the
	// user to run. Set by DAC_HOST=bruin; any other value leaves it false.
	BruinHost bool
}

func (BuildInfo) WithHostEnv added in v0.32.3

func (b BuildInfo) WithHostEnv() BuildInfo

WithHostEnv returns b with BruinPath and BruinHost read from DAC_BRUIN_PATH and DAC_HOST. main calls it once at startup; nothing else in dac reads them.

Jump to

Keyboard shortcuts

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