cli

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 33 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 implements mqx's cobra command tree.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotConfirmed = errors.New("not confirmed")

ErrNotConfirmed is returned when a mutating command was not confirmed.

View Source
var ErrReadOnly = errors.New("context is read_only")

ErrReadOnly is returned for a mutating command on a read_only context.

Functions

func Execute

func Execute(ctx context.Context, opts ...Option) int

Execute runs mqx and returns the process exit code. Cobra prints errors to stderr.

func NewRootCmd

func NewRootCmd(opts ...Option) *cobra.Command

NewRootCmd builds a fresh mqx command tree.

Types

type Option

type Option func(*options)

Option customises the command tree; used to wire the TUI and by tests.

func WithTUI

func WithTUI(run func(ctx context.Context, opts TUIOptions) error) Option

WithTUI sets the function `mqx` and `mqx tui` use to start the interactive UI.

type TUIOptions

type TUIOptions struct {
	ConfigPath string
	Context    string
	Topic      string
	Group      string
}

TUIOptions are the deep-link flags of `mqx tui`.

Jump to

Keyboard shortcuts

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