internal

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	JSONAlpha1 = "json-alpha1"
	Text       = "text"
)

Variables

This section is empty.

Functions

func NewLoggerTo

func NewLoggerTo(w io.Writer) *log.Logger

NewLoggerTo returns a logger that writes logs to w.

Types

type Result

type Result struct {
	Passed  bool     `json:"passed"`
	Outputs []output `json:"outputs"`
}

Result represents the final result

func NewResult

func NewResult() *Result

NewResult return a new result object which starts with passed == true since has no errors

func (*Result) AddError

func (o *Result) AddError(err error)

AddError will add a log to the result with the Error Level

func (*Result) AddInfo

func (o *Result) AddInfo(msg string)

AddInfo will add a log to the result with the Info Level

func (*Result) AddManifestResults

func (o *Result) AddManifestResults(results ...apierrors.ManifestResult)

AddManifestResults adds warnings and errors in results to Results.

func (*Result) AddWarn

func (o *Result) AddWarn(err error)

AddWarn will add a log to the result with the Warn Level

func (*Result) PrintWithFormat

func (o *Result) PrintWithFormat(format string) (err error)

PrintWithFormat prints output to w in format, and exits if some object in output is not in a passing state.

Jump to

Keyboard shortcuts

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