shared

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOutputFlags added in v1.0.0

func AddOutputFlags(cmd *cobra.Command, opts *OutputOptions)

AddOutputFlags registers --json / -j, --table / -t, --csv / -c on the given command. --non-interactive / -n is registered as a hidden alias for --table for backwards compatibility.

func IsFeatureNotEnabledError

func IsFeatureNotEnabledError(err error) bool

IsFeatureNotEnabledError checks if the error indicates that a feature is not enabled for the user. Uses semantic matching on key phrases for robustness against minor wording changes.

func ParseIDFile added in v1.0.0

func ParseIDFile(filePath string) ([]string, error)

ParseIDFile reads a file containing one ID per line. It trims whitespace, skips blank lines, and returns an error if the file is empty or contains no valid entries.

func ResolveFormat added in v1.0.0

func ResolveFormat(opts OutputOptions) string

ResolveFormat returns the resolved format string based on the flags set. Priority: json > csv > table. Returns "" to indicate auto (TUI if TTY, else table).

Types

type OutputOptions added in v1.0.0

type OutputOptions struct {
	Json  bool
	Csv   bool
	Table bool
}

OutputOptions holds the output format flags for list commands.

Jump to

Keyboard shortcuts

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