reporter

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
}

Builder contains the information and logic needed to create a new reporter.

func New

func New() *Builder

New creates a builder that can then be used to configure and build a reporter.

func (*Builder) Build

func (b *Builder) Build() (result *Object, err error)

Build uses the information contained in the builder to create a new reporter.

type Object

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

Object is the reported object used by the tool. It prints the messages to the standard output or error streams.

func CreateReporterOrExit

func CreateReporterOrExit() *Object

CreateReporterOrExit creates the reportor instance or exits to the console noting the error on failure.

func (*Object) Debugf

func (r *Object) Debugf(format string, args ...interface{})

Debugf prints a debug message with the given format and arguments.

func (*Object) Errorf

func (r *Object) Errorf(format string, args ...interface{}) error

Errorf prints an error message with the given format and arguments. It also return an error containing the same information, which will be usually discarded, except when the caller needs to report the error and also return it.

func (*Object) Errors

func (r *Object) Errors() int

Errors returns the number of errors that have been reported via this reporter.

func (*Object) Infof

func (r *Object) Infof(format string, args ...interface{})

Infof prints an informative message with the given format and arguments.

func (*Object) Warnf

func (r *Object) Warnf(format string, args ...interface{})

Warnf prints an warning message with the given format and arguments.

Jump to

Keyboard shortcuts

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