Versions in this module Expand all Collapse all v0 v0.0.1 Dec 11, 2023 Changes in this version + func DirectStreams() (io.Writer, io.Writer, error) + func ExitWhenParentProcessEnds() + func Fatal(errorMsg string, exitCode ExitCode) + func FatalError(err error, exitCode ExitCode) + func FatalResult(res ErrorResult, exitCode ExitCode) + func InputUserField(prompt string, secret bool) (string, error) + func InteractiveStreams() (io.Reader, io.Writer, error) + func IsTerminal() bool + func NewBufferedStreams() (io.Writer, io.Writer, func() *OutputStreamsResult) + func NewCommand() *cobra.Command + func NewDownloadProgressBarCB() func(*rpc.DownloadProgress) + func NewTaskProgressCB() func(curr *rpc.TaskProgress) + func OutputStreams() (io.Writer, io.Writer, func() *OutputStreamsResult) + func Print(v string) + func PrintResult(res Result) + func Printf(format string, v ...interface{}) + func ProgressBar() rpc.DownloadProgressCB + func RestoreModeStdin() + func SetErr(err io.Writer) + func SetFormat(f OutputFormat) + func SetOut(out io.Writer) + func SetRawModeStdin() error + func TaskProgress() rpc.TaskProgressCB + func Warning(msg string) + type ErrorResult interface + ErrorString func() string + type ExitCode int + const ErrBadArgument + const ErrBadTCPPortArgument + const ErrCoreConfig + const ErrFailedToListenToTCPPort + const ErrGeneric + const ErrInitializingInventory + const ErrMissingProgrammer + const ErrNetwork + const ErrNoConfigFile + const Success + type OutputFormat int + const JSON + const MinifiedJSON + const Text + const YAML + func GetFormat() OutputFormat + func ParseOutputFormat(in string) (OutputFormat, bool) + func (f OutputFormat) String() string + type OutputStreamsResult struct + Stderr string + Stdout string + func (r *OutputStreamsResult) Data() interface{} + func (r *OutputStreamsResult) Empty() bool + func (r *OutputStreamsResult) String() string + type Result interface + Data func() interface{}