cli

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package cli wires cobra subcommands, global flags, and exit-code mapping.

Index

Constants

View Source
const (
	ExitOK                     = 0
	ExitConnFailed             = 2
	ExitReadonlyViolation      = 3
	ExitDDLRequiresWrite       = 4
	ExitDestructiveRequiresYes = 5
	ExitIdentifierInvalid      = 6
	ExitMultiStatement         = 7
	ExitSQLError               = 8
	ExitQueryTimeout           = 9
	ExitConfigError            = 10
	ExitInitFailed             = 11
)

Exit codes (see plan Global Constraints).

Variables

View Source
var ErrInitAllFailed = errors.New("all agent skill installs failed")

ErrInitAllFailed is returned when every selected agent install failed.

Functions

func Run

func Run(args []string) int

Run parses args and executes; returns the process exit code.

Types

type Globals

type Globals struct {
	Datasource string
	Format     string
	Write      bool
	DDL        bool
	Yes        bool
	Limit      int
	Timeout    string
	ConfigPath string
	Host       string
	Port       int
	User       string
	Password   string
	Database   string
	// contains filtered or unexported fields
}

Globals carries parsed global flags shared by all subcommands.

Jump to

Keyboard shortcuts

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