output

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogDrawer

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

LogDrawer is responsible for printing formatted output with colors.

func NewLogDrawer

func NewLogDrawer(nodes []analysis.Node) (*LogDrawer, error)

func (*LogDrawer) DrawDependents added in v1.2.0

func (l *LogDrawer) DrawDependents(path string)

func (*LogDrawer) DrawList added in v1.3.0

func (l *LogDrawer) DrawList()

func (*LogDrawer) ReportExceededDeps

func (l *LogDrawer) ReportExceededDeps(path string, maxDirectDeps, maxIndirectDeps, maxDepth, maxLines, maxDependent int, weight float32) bool

ReportExceededDeps checks if any package exceeds the given thresholds for dependencies, depth, lines, dependents, and weight, and reports any violations to the console. It returns true if any package exceeded the thresholds.

type TableDrawer added in v1.2.3

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

TableDrawer is responsible for drawing tables with dependency data.

func NewTableDrawer added in v1.2.3

func NewTableDrawer(maxDirectDeps, maxIndirectDeps, maxDependents, maxDepth, maxLines int) (*TableDrawer, error)

func (*TableDrawer) DrawTable added in v1.2.3

func (d *TableDrawer) DrawTable(path string, rows [][]string, sortType analysis.SortType) error

DrawTable renders a table with given data, sorted by given sort type. It colors the table based on the sort type: by limit or by weight. It returns an error if no packages found or any row does not match the table headers.

Jump to

Keyboard shortcuts

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