Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONPrinter ¶
type JSONPrinter struct { }
JSONPrinter is a JSON printer (the default one)
func NewPrinterJSON ¶
func NewPrinterJSON(options Options) (*JSONPrinter, error)
NewPrinterJSON returns a JSON printer
func (*JSONPrinter) PrintReleases ¶
func (p *JSONPrinter) PrintReleases(rr []gh.Release) error
PrintReleases displays a list of releases in JSON format
type PlainPrinter ¶
type PlainPrinter struct {
// contains filtered or unexported fields
}
PlainPrinter is a plain text printer (the default one)
func NewPrinterPlain ¶
func NewPrinterPlain(options Options) (*PlainPrinter, error)
NewPrinterPlain returns a plaintext printer
func (*PlainPrinter) PrintReleases ¶
func (p *PlainPrinter) PrintReleases(rr []gh.Release) error
PrintReleases displays a list of releases to the standard output
type Printer ¶
type Printer interface { // PrintReleases receives a list of releases, // formats it and prints it to stdout. PrintReleases([]gh.Release) error }
Printer is an interface used to print objects.
type TemplatePrinter ¶
type TemplatePrinter struct {
// contains filtered or unexported fields
}
TemplatePrinter represents a Template printer
func NewPrinterTemplate ¶
func NewPrinterTemplate(options Options) (*TemplatePrinter, error)
NewPrinterTemplate returns a Template printer For TemplatePrinter, the options parameter contains the template string. The "color_mode" option defines the color behaviour: it can be "auto" (default), "on" (forced), "off" (disabled).
func (*TemplatePrinter) PrintReleases ¶
func (p *TemplatePrinter) PrintReleases(rr []gh.Release) error
PrintReleases displays a list of releases to the standard output
type YAMLPrinter ¶
type YAMLPrinter struct { }
YAMLPrinter is a YAML printer (the default one)
func NewPrinterYAML ¶
func NewPrinterYAML(options Options) (*YAMLPrinter, error)
NewPrinterYAML returns a YAML printer
func (*YAMLPrinter) PrintReleases ¶
func (p *YAMLPrinter) PrintReleases(rr []gh.Release) error
PrintReleases displays a list of releases in YAML format