meta

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 6 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 meta provides the "jira meta" command group for CLI introspection.

Index

Constants

View Source
const RequiredAnnotation = "jira_required"

RequiredAnnotation is a custom flag annotation key used to signal that a flag is required for meta commands discovery, without triggering Cobra's built-in required-flag enforcement (which would replace custom CLIError messages with Cobra's generic error).

Variables

This section is empty.

Functions

func MarkRequired

func MarkRequired(cmd *cobra.Command, names ...string)

MarkRequired marks a flag as required for meta commands discovery. Unlike Cobra's MarkFlagRequired, this does not change runtime validation.

func NewCmdCommands

func NewCmdCommands(f *factory.Factory) *cobra.Command

NewCmdCommands creates the "meta commands" command.

func NewCmdMeta

func NewCmdMeta(f *factory.Factory) *cobra.Command

NewCmdMeta creates the "meta" command group.

func NewCmdVersion

func NewCmdVersion(f *factory.Factory) *cobra.Command

NewCmdVersion creates the "meta version" command.

Types

type ArgInfo

type ArgInfo struct {
	Name        string `json:"name"`
	Required    bool   `json:"required"`
	Description string `json:"description"`
}

ArgInfo describes a positional argument.

type CommandInfo

type CommandInfo struct {
	Command     string     `json:"command"`
	Description string     `json:"description"`
	Args        []ArgInfo  `json:"args"`
	Flags       []FlagInfo `json:"flags"`
}

CommandInfo describes a single CLI command for machine consumption.

type CommandsOptions

type CommandsOptions struct {
	Factory *factory.Factory
	Root    *cobra.Command
}

CommandsOptions holds all resolved inputs for the meta commands command.

type FlagInfo

type FlagInfo struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Required    bool   `json:"required"`
	Default     string `json:"default"`
	Description string `json:"description"`
}

FlagInfo describes a command flag.

type VersionInfo

type VersionInfo struct {
	Version  string  `json:"version"`
	API      string  `json:"api"`
	Instance *string `json:"instance"`
}

VersionInfo describes the CLI version for machine consumption.

type VersionOptions

type VersionOptions struct {
	Factory *factory.Factory
	Root    *cobra.Command
}

VersionOptions holds all resolved inputs for the meta version command.

Jump to

Keyboard shortcuts

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