app

package
v0.0.0-...-e54ee60 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(w io.Writer, option Options) (int, error)

Types

type Options

type Options struct {
	DisableTableOutput bool
	FollowOutput       bool
	DisableColor       bool
	Format             OutputFormat
	Sorter             parse.PackageSorter
	ShowNoTests        bool
	FileName           string

	// Test table options
	TestTableOptions    TestTableOptions
	SummaryTableOptions SummaryTableOptions

	// TODO(mf): implement
	Progress bool
}

type OutputFormat

type OutputFormat int
const (
	// OutputFormatBasic is a normal table withput a border
	OutputFormatPlain OutputFormat = iota + 1
	// OutputFormatBasic is a normal table with border
	OutputFormatBasic
	// OutputFormatBasic is a markdown-rendered table
	OutputFormatMarkdown
)

type SummaryTableOptions

type SummaryTableOptions struct {
	// For narrow screens, remove common prefix and trim long package names vertically. Example:
	// github.com/iziang/tparse/app
	// github.com/iziang/tparse/internal/seed-up-down-to-zero
	//
	// tparse/app
	// tparse
	//  /seed-up-down-to-zero
	Trim bool
}

type TestTableOptions

type TestTableOptions struct {
	// Display passed or skipped tests. If both are true this is equivalent to all.
	Pass, Skip bool
	// For narrow screens, trim long test identifiers vertically. Example:
	// TestNoVersioning/seed-up-down-to-zero
	//
	// TestNoVersioning
	//  /seed-up-down-to-zero
	Trim bool

	// Display up to N slow tests for each package, tests are sorted by
	// calculated the elapsed time for the given test.
	Slow int
}

Jump to

Keyboard shortcuts

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