problems

package
v0.3.24 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller added in v0.1.64

type Caller struct {
	File     string `json:"file" yaml:"file"`
	Line     int    `json:"line" yaml:"line"`
	Function string `json:"function" yaml:"function"`
}

type Problem

type Problem struct {
	Section string   `json:"section" yaml:"section"`
	Item    string   `json:"item" yaml:"item"`
	Message string   `json:"message" yaml:"message"`
	Row     int      `json:"row" yaml:"row"`
	Column  int      `json:"column" yaml:"column"`
	Callers []Caller `json:"callers" yaml:"callers"`
}

func NewProblem

func NewProblem(section string, item string, message string, row int, column int, skip int) *Problem

func (*Problem) Equals

func (self *Problem) Equals(problem *Problem) bool

func (*Problem) String

func (self *Problem) String() string

(fmt.Stringer interface)

type ProblemSlice

type ProblemSlice []*Problem

func (ProblemSlice) Len

func (self ProblemSlice) Len() int

sort.Interface interface

func (ProblemSlice) Less

func (self ProblemSlice) Less(i, j int) bool

sort.Interface interface

func (ProblemSlice) Swap

func (self ProblemSlice) Swap(i, j int)

sort.Interface interface

type Problematic

type Problematic interface {
	Problem(*terminal.Stylist) (string, string, string, int, int)
}

type Problems

type Problems struct {
	Problems ProblemSlice      `json:"problems" yaml:"problems"`
	Stylist  *terminal.Stylist `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

func NewProblems added in v0.1.24

func NewProblems(stylist *terminal.Stylist) *Problems

func (*Problems) Append

func (self *Problems) Append(problem *Problem) bool

func (*Problems) Empty

func (self *Problems) Empty() bool

func (*Problems) Merge

func (self *Problems) Merge(problems *Problems) bool

func (*Problems) NewProblems added in v0.1.24

func (self *Problems) NewProblems() *Problems

func (*Problems) Print

func (self *Problems) Print(locate bool) bool

func (*Problems) Report

func (self *Problems) Report(skip int, item string, message string) bool

func (*Problems) ReportError

func (self *Problems) ReportError(err error) bool

func (*Problems) ReportFull added in v0.1.15

func (self *Problems) ReportFull(skip int, section string, item string, message string, row int, column int) bool

func (*Problems) ReportProblematic

func (self *Problems) ReportProblematic(skip int, problematic Problematic) bool

func (*Problems) Reportf

func (self *Problems) Reportf(skip int, item string, format string, arg ...any) bool

func (*Problems) Slice added in v0.1.20

func (self *Problems) Slice() ProblemSlice

func (*Problems) String

func (self *Problems) String() string

(fmt.Stringer interface)

func (*Problems) ToError added in v0.1.60

func (self *Problems) ToError(locate bool) error

func (*Problems) ToString

func (self *Problems) ToString(locate bool) string

func (*Problems) WithError added in v0.1.57

func (self *Problems) WithError(err error, locate bool) error

func (*Problems) Write

func (self *Problems) Write(writer io.Writer, stylist *terminal.Stylist, pretty bool, locate bool) bool

Jump to

Keyboard shortcuts

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