output

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(dryRun bool, format string, a ...interface{})

func Log

func Log(dryRun bool, format string, a ...interface{})

func PrettyList

func PrettyList(stream io.Writer, body []byte) error

Pretty dumps the given data to the given stream so that it looks pretty. If the data is a valid JSON document then it will be indented before printing it. If the stream is a terminal then the output will also use colors.

func PrintListMultiline

func PrintListMultiline(w *PrefixWriter, title string, values []string)

func TabbedString

func TabbedString(f func(io.Writer) error) (string, error)

Types

type PrefixWriter

type PrefixWriter struct {
	// contains filtered or unexported fields
}

func NewPrefixWriter

func NewPrefixWriter(out io.Writer, prefix string) *PrefixWriter

func (*PrefixWriter) Flush

func (pw *PrefixWriter) Flush()

func (*PrefixWriter) Write

func (pw *PrefixWriter) Write(p []byte)

func (*PrefixWriter) WriteString

func (pw *PrefixWriter) WriteString(format string, a ...interface{})

Jump to

Keyboard shortcuts

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