cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
)

Exit codes (see plan Global Constraints).

Variables

This section is empty.

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