outputHelpers

package
v0.0.0-...-2de43c5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package outputHelpers provides output helpers including StreamMany

Index

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 PreRunWithJsonWriter(cmdName string, getOptions func() *globals.GlobalOptions) func(cmd *cobra.Command, args []string)

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.

Jump to

Keyboard shortcuts

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