cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

Build metadata, stamped via -ldflags (spec §7).

Functions

func Execute

func Execute()

Execute runs the CLI with fang and maps errors to exit codes (spec §6).

func Root

func Root() *cobra.Command

Root builds the full command tree.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App carries the global flag values and builds the engine/output per command.

type Output

type Output struct {
	// contains filtered or unexported fields
}

Output renders Rows in the chosen format, streaming where possible. Snowflake IDs are always strings (the Value objects tag them as such).

func NewOutput

func NewOutput(w io.Writer, format, fields, tmplStr string, noHeader bool) (*Output, error)

NewOutput builds an Output for a format. tmplStr, when non-empty, switches to template rendering over each Row.Value.

func (*Output) Emit

func (o *Output) Emit(r Row) error

Emit renders one row.

func (*Output) Flush

func (o *Output) Flush() error

Flush closes any open array/buffered writer.

type Row

type Row struct {
	Cols  []string
	Vals  []string
	Value any
}

Row is one renderable record: a curated column set for the table/csv views plus the full typed object as Value for --json and --template (spec §4.3/§4.4).

Jump to

Keyboard shortcuts

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