display

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 29 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

Index

Constants

This section is empty.

Variables

View Source
var (
	ResultError  error
	ResultString string
)
View Source
var (
	ExitFunc = os.Exit
)

Functions

func OutputError added in v0.3.0

func OutputError(outputFormat *OutputFormat, message string, params ...any)

func OutputInfo added in v0.3.0

func OutputInfo(outputFormat *OutputFormat, details any, message string, params ...any)

func OutputObject

func OutputObject(value map[string]any, serviceName, templateContent string, outputFormat *OutputFormat)

func OutputWarning added in v0.3.0

func OutputWarning(outputFormat *OutputFormat, message string, params ...any)

func OutputWithFormat added in v0.3.0

func OutputWithFormat(msg *OutputMessage, outputFormat *OutputFormat)

func RenderConfigTable

func RenderConfigTable(cfg *ini.File, outputformat *OutputFormat)

func RenderTable

func RenderTable(values []map[string]any, columnsToDisplay []string, outputFormat *OutputFormat)

func RunGenericChoicePicker

func RunGenericChoicePicker(question string, choices map[string]string, overrideHeight int) (string, string, error)

func RunLoginInput

func RunLoginInput(customEndpoint bool) map[string]string

func RunLoginPicker

func RunLoginPicker(question string, choices []string) string

Types

type OutputFormat

type OutputFormat struct {
	Output string
}

OutputFormat controls the output format of the CLI. The Output field can be "json", "yaml", "interactive", or a custom gval expression.

func (*OutputFormat) CustomFormat

func (o *OutputFormat) CustomFormat() string

func (*OutputFormat) IsInteractive added in v0.10.0

func (o *OutputFormat) IsInteractive() bool

func (*OutputFormat) IsJson added in v0.10.0

func (o *OutputFormat) IsJson() bool

func (*OutputFormat) IsYaml added in v0.10.0

func (o *OutputFormat) IsYaml() bool

type OutputMessage added in v0.3.0

type OutputMessage struct {
	Message string `json:"message,omitempty"`
	Error   bool   `json:"error,omitempty"`
	Warning bool   `json:"warning,omitempty"`
	Details any    `json:"details,omitempty"`
}

Jump to

Keyboard shortcuts

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