errorview

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: 4 Imported by: 0

Documentation

Overview

Package errorview implements a view that displays errors in a user-friendly way. Pressing any key in this view will exit the program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorView

type ErrorView interface {
	Title() string
	Description() string
	OriginalError() error
}

ErrorView is a type that can be used to render an error.

type Model

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

Model is the model for the error view.

func New

func New(err ErrorView) Model

New creates a new error view.

func (*Model) SetError

func (m *Model) SetError(err error)

SetError sets the error to be displayed.

func (Model) Update

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

Update is called by bubbletea every time there is a new event.

func (*Model) View

func (m *Model) View() string

View renders the error view.

Jump to

Keyboard shortcuts

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