Documentation
¶
Overview ¶
Package command provides shared configuration for sub-commands in the gh-models extension.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Out is where standard output is written. Out io.Writer // ErrOut is where error output is written. ErrOut io.Writer // Client is the client for interacting with the models service. Client azuremodels.Client // IsTerminalOutput is true if the output should be formatted for a terminal. IsTerminalOutput bool // TerminalWidth is the width of the terminal. TerminalWidth int }
Config represents configurable settings for a command.
func NewConfig ¶
func NewConfig(out, errOut io.Writer, client azuremodels.Client, isTerminalOutput bool, width int) *Config
NewConfig returns a new command configuration.
func NewConfigWithTerminal ¶
func NewConfigWithTerminal(terminal term.Term, client azuremodels.Client) *Config
NewConfigWithTerminal returns a new command configuration using the given terminal.
func (*Config) NewTablePrinter ¶
func (c *Config) NewTablePrinter() tableprinter.TablePrinter
NewTablePrinter initializes a table printer with terminal mode and terminal width.
func (*Config) WriteToOut ¶
WriteToOut writes a message to the configured stdout writer.
Click to show internal directories.
Click to hide internal directories.