printer

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorRed    = "\x1b[91m"
	ColorGreen  = "\x1b[32m"
	ColorBlue   = "\x1b[94m"
	ColorGray   = "\x1b[90m"
	ColorYellow = "\x1b[33m"
	ColorWhite  = "\x1b[37m"
)

Functions

func CreateBodyRow

func CreateBodyRow(cellsData []CellData) []*simpletable.Cell

func CreateFooter

func CreateFooter(s Statistics, columnsCount int) *simpletable.Footer

func CreateHeader

func CreateHeader(titles []string) *simpletable.Header

func PrintError

func PrintError(msg string)

PrintErrorf prints a message with error color

func PrintErrors

func PrintErrors(errors []error)

func PrintFindings

func PrintFindings(results []checkmodels.CheckRunResult, supportedChecks []string, outputFilePath string, isQuiet bool, repositoryUrl string, outputTemplateFilePath string)

func PrintOutputToFile

func PrintOutputToFile(data []checkmodels.CheckRunResult, outputFilePath string, repositoryUrl string, outputTemplate string)

Types

type CellData

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

type Statistics

type Statistics struct {
	Passed  int `json:"passed,omitempty"`
	Failed  int `json:"failed,omitempty"`
	Unknown int `json:"unknown,omitempty"`
	Total   int `json:"total,omitempty"`
}

func NewStatistics added in v0.1.0

func NewStatistics() Statistics

NewStatistics initializes a new Statistics struct.

func (*Statistics) Add added in v0.1.0

func (s *Statistics) Add(value checkmodels.ResultStatus) error

Add increments the value of a specific field as well as the total value.

func (*Statistics) Sub added in v0.1.0

func (s *Statistics) Sub(value checkmodels.ResultStatus) error

Sub decrements the value of a specific field as well as the total value.

Jump to

Keyboard shortcuts

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