model

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package model implements tea.Model. The model created by it can be used directly in the tea framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model implements tea.Model.

func New

func New(opts ...Option) *Model

New create a new model that can be used directly in the tea framework.

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init implements tea.Model.

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Model) View

func (m *Model) View() string

View implements tea.Model.

type Option

type Option func(*Model)

Option is a function that can be used to modify the model.

func WithCodeRoot

func WithCodeRoot(root string) Option

WithCodeRoot sets the root directory of the code to be analyzed.

func WithCoverageSorting added in v0.4.0

func WithCoverageSorting(sortByCoverage bool) Option

WithCoverageSorting asks for the profiles to be sorted by coverage percent instead of alphabetically.

func WithFilteredLines added in v0.5.0

func WithFilteredLines(files map[string][]int) Option

WithFilteredLines sets a list of lines to display for every file. Other lines will not appear.

func WithProfileFilename

func WithProfileFilename(name string) Option

WithProfileFilename sets the filename of the coverage report to be loaded.

func WithRequestedFiles added in v0.3.0

func WithRequestedFiles(files []string) Option

WithRequestedFiles sets the list of files to be displayed.

Jump to

Keyboard shortcuts

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