internal

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LastTimeCursorMove = [2]int{int(time.Now().UnixMicro()), 0} //nolint: gochecknoglobals // Todo : Move to model struct

These represent model's state information, its not a global preperty

View Source
var ListeningMessage = true //nolint: gochecknoglobals // Todo : Move to model struct
View Source
var SampleDataBytes = []byte("This is sample") //nolint: gochecknoglobals // Effectively const

Functions

func InitialModel

func InitialModel(firstFilePanelDirs []string, firstUseCheck, hasTrashCheck bool) tea.Model

Initialize and return model with default configs It returns only tea.Model because when it used in main, the return value is passed to tea.NewProgram() which accepts tea.Model Either way type 'model' is not exported, so there is not way main package can be aware of it, and use it directly

func IsTeaQuit added in v1.3.0

func IsTeaQuit(cmd tea.Cmd) bool

Is the command tea.quit, or a batch that contains tea.quit

func TeaUpdate added in v1.3.0

func TeaUpdate(m *model, msg tea.Msg) (tea.Cmd, error)

TeaUpdate : Utility to send update to model , majorly used in tests Not using pointer receiver as this is more like a utility, than a member function of model Todo : Consider wrapping TeaUpdate with a helper that both forwards the return values and does a require.NoError(t, err)

func TeaUpdateWithErrCheck added in v1.3.0

func TeaUpdateWithErrCheck(t *testing.T, m *model, msg tea.Msg) tea.Cmd

Types

This section is empty.

Directories

Path Synopsis
ui

Jump to

Keyboard shortcuts

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