cli

package
v1.0.14 Latest Latest
Warning

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

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

Documentation

Overview

Package cli wires the lincrawl Kong command tree, JSON output, and exit codes. It owns argument parsing and the thin orchestration that connects config → store → syncer.

Index

Constants

View Source
const (
	ExitOK         = 0
	ExitInternal   = 1
	ExitUsage      = 2
	ExitNotFound   = 3
	ExitValidation = 4
	ExitConfig     = 5
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, args []string, stdout, stderr io.Writer) int

Run parses args and dispatches to the chosen subcommand. The returned int is intended to be passed to os.Exit; 0 on success.

Types

type CLIError

type CLIError struct {
	Code    string
	ExitVal int
	Message string
	Wrapped error
}

func (*CLIError) Error

func (e *CLIError) Error() string

func (*CLIError) Unwrap

func (e *CLIError) Unwrap() error

Jump to

Keyboard shortcuts

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