package
1.2.0
Repository: https://github.com/arduino/arduino-cli.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

DirectStreams returns the underlying io.Writer to directly stream to stdout and stderr.
ExitWhenParentProcessEnds waits until the controlling parent process ends and then exits the current process.
Fatal outputs the errorMsg and exits with status exitCode.
FatalError outputs the error and exits with status exitCode.
FatalResult outputs the result and exits with status exitCode.
GetFormat returns the output format currently set.
HasConsole returns true if the CLI outputs to a terminal/console.
InputUserField prompts the user to input the provided user field.
InteractiveStreams returns the underlying io.Reader and io.Writer to directly stream to stdin and stdout.
IsCI returns true if running on CI environments.
IsInteractive returns true if the CLI is interactive (it can receive inputs from terminal/console).
NewBufferedStreams returns a pair of io.Writer to buffer the command output.
NewCommand creates a new `feedback` command.
NewDownloadProgressBarCB creates a progress bar callback that outputs a progress bar on the terminal.
NewTaskProgressCB returns a commands.TaskProgressCB progress listener that outputs to terminal.
OutputStreams returns a pair of io.Writer to write the command output.
ParseOutputFormat parses a string and returns the corresponding OutputFormat.
Print behaves like fmt.Print but writes on the out writer and adds a newline.
Printf behaves like fmt.Printf but writes on the out writer and adds a newline.
PrintResult is a convenient wrapper to provide feedback for complex data, where the contents can't be just serialized to JSON but requires more structure.
ProgressBar returns a DownloadProgressCB that prints a progress bar.
RestoreModeStdin restore the terminal settings to the normal non-RAW state.
SetErr can be used to change the err writer at runtime.
SetFormat can be used to change the output format at runtime.
SetOut can be used to change the out writer at runtime.
SetRawModeStdin sets the stdin stream in RAW mode (no buffering, echo disabled, no terminal escape codes nor signals interpreted).
TaskProgress returns a TaskProgressCB that prints the task progress.
WarnAboutDeprecatedFiles warns the user that a type of sketch files are deprecated.
Warning outputs a warning message.

# Constants

ErrBadArgument is returned when the arguments are not valid (7).
ErrBadTCPPortArgument is returned if the TCP port argument is not valid (9).
ErrCoreConfig represents an error in the cli core config, for example some basic files shipped with the installation are missing, or cannot create or get basic directories vital for the CLI to work.
ErrFailedToListenToTCPPort is returned if the CLI failed to open a TCP port to listen for incoming connections (8).
ErrGeneric Generic error (1 is the reserved "catchall" code in Unix).
ErrInitializingInventory is returned when the inventory cannot be initialized, usually depends on a wrong configuration of the data dir (10).
ErrMissingProgrammer is returned when the programmer argument is missing (11).
ErrNetwork is returned when a network error occurs (5).
ErrNoConfigFile is returned when the config file is not found (3).
JSON format.
MinifiedJSON format.
Success (0 is the no-error return code in Unix).
Text is the plain text format, suitable for interactive terminals.

# Structs

OutputStreamsResult contains the accumulated stdout and stderr output when the selected output format is not Text.

# Interfaces

ErrorResult is a result embedding also an error.
Result is anything more complex than a sentence that needs to be printed for the user.

# Type aliases

ExitCode to be used for Fatal.
OutputFormat is an output format.