Documentation ¶
Overview ¶
Package outputHelpers provides output helpers including StreamMany
Index ¶
- func CloseJsonWriterIfNeededApi(cmdName string, err error, opts *globals.GlobalOptions)
- func InitJsonWriterApi(cmdName string, w io.Writer, opts *globals.GlobalOptions)
- func PostRunWithJsonWriter(getOptions func() *globals.GlobalOptions) func(cmd *cobra.Command, args []string)
- func PreRunWithJsonWriter(cmdName string, getOptions func() *globals.GlobalOptions) func(cmd *cobra.Command, args []string)
- func SetWriterForCommand(cmdName string, opts *globals.GlobalOptions)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseJsonWriterIfNeededApi ¶
func CloseJsonWriterIfNeededApi(cmdName string, err error, opts *globals.GlobalOptions)
CloseJsonWriterIfNeededApi will close JsonWriter if the format is json
func InitJsonWriterApi ¶
func InitJsonWriterApi(cmdName string, w io.Writer, opts *globals.GlobalOptions)
InitJsonWriterApi inits JsonWriter for API responses
func PostRunWithJsonWriter ¶
func PostRunWithJsonWriter(getOptions func() *globals.GlobalOptions) func(cmd *cobra.Command, args []string)
func PreRunWithJsonWriter ¶
func SetWriterForCommand ¶
func SetWriterForCommand(cmdName string, opts *globals.GlobalOptions)
SetWriterForCommand sets the writer for currently running command, but only if we are running with --file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.