diagnostics

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputWithGlobalStats

func OutputWithGlobalStats(group StatGroup) string

Types

type CatalopOpts

type CatalopOpts struct {
	Stat         func(string) (fs.FileInfo, error)
	LoadCatalog  func(catalog.LoadOpts) (*catalog.Catalog, error)
	CheckCatalog func(string) error
	Git          GitOpts
}

type ConfigOpts

type ConfigOpts struct {
	Stat func(string) (fs.FileInfo, error)
}

type ExecutableOptions

type ExecutableOptions struct {
	LookupExecutable func() (string, error)
	AbsolutePath     func(string) (string, error)
}

type GitOpts

type GitOpts struct {
	IsValid               func(string) bool
	GetUncommittedChanges func(string) ([]string, error)
	GetDefaultBranch      func(string) (string, error)
	GetCurrentBranch      func(string) (string, error)
	IsInSyncWithRemote    func(string, string) (bool, error)
	GetCurrentCommit      func(string) (string, error)
}

type Group

type Group struct {
	Title     string
	Messages  Messages
	SubGroups Groups
	// contains filtered or unexported fields
}

func (*Group) AddMsg

func (group *Group) AddMsg(typ string, value string, details ...Message) *Group

func (*Group) AddSubGroup

func (group *Group) AddSubGroup(sub ...Group) *Group

func (Group) Stats

func (group Group) Stats() (result Stats)

func (Group) String

func (group Group) String() string

func (Group) StripAnsi

func (group Group) StripAnsi() Group

type Groups

type Groups []Group

func Evaluate

func Evaluate(cliVersion string, cfg *config.Config) Groups

func (Groups) Stats

func (groups Groups) Stats() (stats Stats)

func (Groups) String

func (groups Groups) String() string

type Message

type Message struct {
	Type    string
	Value   string
	Details Messages
}

func (Message) String

func (msg Message) String() string

func (Message) StripAnsi

func (msg Message) StripAnsi() Message

type Messages

type Messages []Message

func (Messages) String

func (set Messages) String() string

type StatGroup

type StatGroup interface {
	fmt.Stringer
	Stats() Stats
}

type Stats

type Stats struct {
	Failed   int
	Warnings int
}

Jump to

Keyboard shortcuts

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