report

package
v0.0.0-...-cf7e68b Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package report generates console and Markdown output.

Index

Constants

This section is empty.

Variables

View Source
var ConsoleWidth = 80

ConsoleWidth Width of headers

Functions

This section is empty.

Types

type ConsoleFormatter

type ConsoleFormatter struct {
	Out io.Writer
	// contains filtered or unexported fields
}

ConsoleFormatter Console Formatter

func (*ConsoleFormatter) PrintCode

func (f *ConsoleFormatter) PrintCode(msg string)

PrintCode Print Console Code

func (*ConsoleFormatter) PrintError

func (f *ConsoleFormatter) PrintError(msg error)

PrintError Print Console Error

func (*ConsoleFormatter) PrintHeader

func (f *ConsoleFormatter) PrintHeader(msg string)

PrintHeader Prints Console Header

func (*ConsoleFormatter) PrintList

func (f *ConsoleFormatter) PrintList(list []string)

PrintList Print Console List

func (*ConsoleFormatter) PrintMessage

func (f *ConsoleFormatter) PrintMessage(msg string)

PrintMessage Print Console Message

func (*ConsoleFormatter) PrintOK

func (f *ConsoleFormatter) PrintOK(msg string)

PrintOK Print Console OK

func (*ConsoleFormatter) PrintSeparator

func (f *ConsoleFormatter) PrintSeparator()

PrintSeparator Print Console Separator

func (*ConsoleFormatter) PrintSubHeader

func (f *ConsoleFormatter) PrintSubHeader(msg string)

PrintSubHeader Prints Console Sub-Header

func (*ConsoleFormatter) SetOutput

func (f *ConsoleFormatter) SetOutput(output io.Writer)

SetOutput Set Output Writer

type Formatter

type Formatter interface {
	SetOutput(output io.Writer)
	PrintMessage(msg string)
	PrintHeader(msg string)
	PrintSubHeader(msg string)
	PrintSeparator()
	PrintError(msg error)
	PrintOK(msg string)
	PrintCode(msg string)
	PrintList([]string)
}

Formatter Formatter Interface

type MarkdownFormatter

type MarkdownFormatter struct {
	Out io.Writer
	// contains filtered or unexported fields
}

MarkdownFormatter Markdown Formatter

func (*MarkdownFormatter) PrintCode

func (f *MarkdownFormatter) PrintCode(msg string)

PrintCode Print Markdown Code

func (*MarkdownFormatter) PrintError

func (f *MarkdownFormatter) PrintError(msg error)

PrintError Print Markdown Error

func (*MarkdownFormatter) PrintHeader

func (f *MarkdownFormatter) PrintHeader(msg string)

PrintHeader Print Markdown Header Message

func (*MarkdownFormatter) PrintList

func (f *MarkdownFormatter) PrintList(list []string)

PrintList Print Markdown List

func (*MarkdownFormatter) PrintMessage

func (f *MarkdownFormatter) PrintMessage(msg string)

PrintMessage Print Markdown Message

func (*MarkdownFormatter) PrintOK

func (f *MarkdownFormatter) PrintOK(msg string)

PrintOK Print Markdown Error

func (*MarkdownFormatter) PrintSeparator

func (f *MarkdownFormatter) PrintSeparator()

PrintSeparator Print Markdown Separator

func (*MarkdownFormatter) PrintSubHeader

func (f *MarkdownFormatter) PrintSubHeader(msg string)

PrintSubHeader Print Markdown Sub-Header Message

func (*MarkdownFormatter) SetOutput

func (f *MarkdownFormatter) SetOutput(output io.Writer)

SetOutput Set Output Writer

type Reporter

type Reporter struct {
	Formatter Formatter
}

Reporter Reporter Struct

func New

func New() *Reporter

New Report

func (*Reporter) PrintCode

func (r *Reporter) PrintCode(msg string)

PrintCode Print Code

func (*Reporter) PrintCodef

func (r *Reporter) PrintCodef(format string, args ...interface{})

PrintCodef Print Code Formatted

func (*Reporter) PrintError

func (r *Reporter) PrintError(msg error)

PrintError Print Error

func (*Reporter) PrintHeader

func (r *Reporter) PrintHeader(msg string)

PrintHeader Print Header

func (*Reporter) PrintHeaderf

func (r *Reporter) PrintHeaderf(format string, args ...interface{})

PrintHeaderf Print Header Formatted

func (*Reporter) PrintList

func (r *Reporter) PrintList(list []string)

PrintList Print List

func (*Reporter) PrintMessage

func (r *Reporter) PrintMessage(msg string)

PrintMessage Print Message

func (*Reporter) PrintMessagef

func (r *Reporter) PrintMessagef(format string, args ...interface{})

PrintMessagef Print Message Formatted

func (*Reporter) PrintOK

func (r *Reporter) PrintOK(msg string)

PrintOK Print OK

func (*Reporter) PrintOKf

func (r *Reporter) PrintOKf(format string, args ...interface{})

PrintOKf Print OK Formatted

func (*Reporter) PrintSeparator

func (r *Reporter) PrintSeparator()

PrintSeparator Print Separator

func (*Reporter) PrintSubHeader

func (r *Reporter) PrintSubHeader(msg string)

PrintSubHeader Print Sub-Header

func (*Reporter) PrintSubHeaderf

func (r *Reporter) PrintSubHeaderf(format string, args ...interface{})

PrintSubHeaderf Print Header Formatted

func (*Reporter) SetFormatter

func (r *Reporter) SetFormatter(formatType string)

SetFormatter Set Formatter

func (*Reporter) SetOutputFile

func (r *Reporter) SetOutputFile(filename *string)

SetOutputFile Set OutputFile

Jump to

Keyboard shortcuts

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