juju: github.com/juju/juju/cmd/output Index | Files

package output

import "github.com/juju/juju/cmd/output"

Index

Package Files

output.go

Variables

var CurrentHighlight = ansiterm.Foreground(ansiterm.Green)

CurrentHighlight is the color used to show the current controller, user or model in tabular

var DefaultFormatters = map[string]cmd.Formatter{
    "yaml": cmd.FormatYaml,
    "json": cmd.FormatJson,
}

DefaultFormatters holds the formatters that can be specified with the --format flag.

var ErrorHighlight = ansiterm.Foreground(ansiterm.Red)

ErrorHighlight is the color used to show error conditions.

var GoodHighlight = ansiterm.Foreground(ansiterm.Green)

GoodHighlight is used to indicate good or success conditions.

var WarningHighlight = ansiterm.Foreground(ansiterm.Yellow)

WarningHighlight is the color used to show warning conditions. Generally things that the user should be aware of, but not necessarily requiring any user action.

func TabWriter Uses

func TabWriter(writer io.Writer) *ansiterm.TabWriter

TabWriter returns a new tab writer with common layout definition.

type Wrapper Uses

type Wrapper struct {
    *ansiterm.TabWriter
}

Wrapper provides some helper functions for writing values out tab separated.

func (*Wrapper) Print Uses

func (w *Wrapper) Print(values ...interface{})

Print writes each value followed by a tab.

func (*Wrapper) PrintColor Uses

func (w *Wrapper) PrintColor(ctx *ansiterm.Context, value interface{})

PrintColor writes the value out in the color context specified.

func (*Wrapper) PrintStatus Uses

func (w *Wrapper) PrintStatus(status status.Status)

PrintStatus writes out the status value in the standard color.

func (*Wrapper) Printf Uses

func (w *Wrapper) Printf(format string, values ...interface{})

Printf writes the formatted text followed by a tab.

func (*Wrapper) Println Uses

func (w *Wrapper) Println(values ...interface{})

Println writes many tab separated values finished with a new line.

Package output imports 5 packages (graph) and is imported by 240 packages. Updated 2018-09-14. Refresh now. Tools for package owners.