output

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SummaryOnly      bool
	Format           string
	SupportedFormats = map[string]struct{}{
		"yaml": {},
	}
)

Functions

func HasFormat

func HasFormat() bool

func PrintResult

func PrintResult(caseRes []*CaseResult)

Types

type CaseResult

type CaseResult struct {
	Name string
	Msg  string
	Err  error
	Skip bool
}

CaseResult represents the result of a verification case.

type Option

type Option func(*printer)

func WithBatchOutput

func WithBatchOutput(batchOutput bool) Option

func WithSummaryOnly

func WithSummaryOnly(summaryOnly bool) Option

type Printer

type Printer interface {
	Start(...string)
	Success(string)
	Warning(string)
	Fail(string)
	UpdateText(string)
	PrintResult([]*CaseResult) (int, int, int)
}

func NewPrinter

func NewPrinter(options ...Option) Printer

type YamlCaseResult

type YamlCaseResult struct {
	Passed       []string
	Failed       []string
	Skipped      []string
	PassedCount  int `yaml:"passedCount"`
	FailedCount  int `yaml:"failedCount"`
	SkippedCount int `yaml:"skippedCount"`
}

Jump to

Keyboard shortcuts

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