Documentation ¶
Index ¶
- func WithOutputFormatters(w io.Writer, input []byte, out bool, formatters ...OutputFormatter) []byte
- type ByteFormatter
- type OutputFormatter
- func WithFileOutput(enabled bool, filename string, append bool) OutputFormatter
- func WithJSONStreamOutput(enabled bool, stream bool, isText bool) OutputFormatter
- func WithOptionalFormatter(enabled bool, formatter ByteFormatter) OutputFormatter
- func WithSuffix(enabled bool, suffix string) OutputFormatter
- func WithTrimSpace(enabled bool) OutputFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithOutputFormatters ¶
func WithOutputFormatters(w io.Writer, input []byte, out bool, formatters ...OutputFormatter) []byte
WithOutputFormatters applies given formatters to byte array
Types ¶
type ByteFormatter ¶
ByteFormatter formats/transforms a byte array
type OutputFormatter ¶
OutputFormatter formats/transforms a byte array
func WithFileOutput ¶
func WithFileOutput(enabled bool, filename string, append bool) OutputFormatter
WithFileOutput writes the response to file if enabled
func WithJSONStreamOutput ¶
func WithJSONStreamOutput(enabled bool, stream bool, isText bool) OutputFormatter
WithJSONStreamOutput converts json to json lines so it can be processed in the pipe
func WithOptionalFormatter ¶
func WithOptionalFormatter(enabled bool, formatter ByteFormatter) OutputFormatter
WithOptionalFormatter formatter which is only applied if it is enabled
func WithSuffix ¶
func WithSuffix(enabled bool, suffix string) OutputFormatter
WithSuffix adds an optional suffix to the output
func WithTrimSpace ¶
func WithTrimSpace(enabled bool) OutputFormatter
WithTrimSpace formatts the json into more human friendly format
Click to show internal directories.
Click to hide internal directories.