output

package
v0.0.0-...-e29e17f Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package output handles writing text/templates to stdout

Index

Constants

View Source
const (
	// SearchType represents an output for the search command
	SearchType = iota
	// IndexType represents an output for the index command
	IndexType
	// HelpType represents an output for the help command
	HelpType
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

type Template struct {
	Type int
	Data interface{}
}

Template represents the template that will be used to write to stdout

func NewTemplate

func NewTemplate(t int, d interface{}) Template

NewTemplate returns a new template builder

func (*Template) Write

func (t *Template) Write() error

Write attempts to write the string to stdout using the template type

Jump to

Keyboard shortcuts

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