csv

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

package csv allows you to render a csv file as a table

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCSV

func ReadCSV(name string) ([][]string, error)

ReadCSV reads a PDF file given a name.

Types

type Model

type Model struct {
	Table    table.Model
	Active   bool
	FileName string
}

Model represents the properties of a pdf bubble.

func New

func New(active bool) Model

New creates a new instance of a CSV.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the CSV bubble.

func (*Model) SetFileName

func (m *Model) SetFileName(filename string) tea.Cmd

SetFileName sets current file to render, this returns a cmd which will render the csv.

func (*Model) SetIsActive

func (m *Model) SetIsActive(active bool)

SetIsActive sets if the bubble is currently active.

func (Model) Update

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

Update handles updating the UI of a code bubble.

func (Model) View

func (m Model) View() string

View returns a string representation of the csv bubble.

Jump to

Keyboard shortcuts

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