internal

package
v0.0.0-...-d81edb6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVManager

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

func NewCSVManager

func NewCSVManager(fullPath string) (mgr *CSVManager, err error)

Creates mgr and loads from fullPath

func (*CSVManager) Init

func (mgr *CSVManager) Init() tea.Cmd

func (*CSVManager) Load

func (mgr *CSVManager) Load() error

Load from mgr.FullPath to csv mgr.Contents

func (*CSVManager) Save

func (mgr *CSVManager) Save() error

Save csv mgr.Contents to mgr.FullPath

func (*CSVManager) SetCell

func (mgr *CSVManager) SetCell(pos CellPosition, value string) error

Set the contents of one cell by a 0 indexed CellPosition err if out of bounds

func (*CSVManager) Update

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

func (*CSVManager) View

func (mgr *CSVManager) View() string

type CellPosition

type CellPosition struct {
	Row int
	Col int
}

0 indexed

func NewCellPosition

func NewCellPosition(row int, col int) CellPosition

type TUIMode

type TUIMode int
const (
	MODE_NORMAL TUIMode = iota
	MODE_EDIT
)

Jump to

Keyboard shortcuts

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