cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package cmd hosts the cobra command tree for the crdb-sql CLI.

The root is a thin shell: each subcommand (validate, format, parse, etc.) is defined in its own file and attached via newRootCmd, which builds a fresh tree per call. Avoiding package-global commands keeps tests independent (no flag-state leakage between t.Run cases) and removes the need for init()-time registration.

Index

Constants

This section is empty.

Variables

View Source
var Version = devVersion

Version is the binary version string. It defaults to devVersion for local builds and is intended to be stamped at link time via:

go build -ldflags "-X github.com/spilchen/sql-ai-tools/cmd.Version=<version>"

Release tooling owns this value; do not mutate it from runtime code.

Functions

func Execute

func Execute() error

Execute runs the root command against process arguments and returns whatever cobra surfaces. It does not print the error or call os.Exit; the caller owns that translation. This keeps the cmd package importable from tests without side effects on process state.

Types

This section is empty.

Directories

Path Synopsis
Command crdb-sql is the CLI entry point for the agent-friendly CockroachDB SQL tooling described in the project README.
Command crdb-sql is the CLI entry point for the agent-friendly CockroachDB SQL tooling described in the project README.
gen-builtins reads a JSON builtin catalog (produced by extract-builtins) and emits a Go source file containing builtinsregistry.Register() calls for each function.
gen-builtins reads a JSON builtin catalog (produced by extract-builtins) and emits a Go source file containing builtinsregistry.Register() calls for each function.

Jump to

Keyboard shortcuts

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