csv

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCSVPlugin

func NewCSVPlugin(logger *slog.Logger) model.ParserPlugin

NewCSVPlugin creates a new CSV file parser plugin

Types

type CSVPlugin

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

CSVPlugin implements model.ParserPlugin for CSV files

func (*CSVPlugin) CanHandle

func (p *CSVPlugin) CanHandle(path string, info fs.FileInfo) bool

CanHandle determines if this plugin can process the given file

func (*CSVPlugin) Chunk

func (p *CSVPlugin) Chunk(content string, path string, opts *schema.CodeChunkingOptions) ([]schema.CodeChunk, error)

Chunk breaks CSV into semantic chunks based on rows or logical sections

func (*CSVPlugin) Extensions

func (p *CSVPlugin) Extensions() []string

Extensions returns file extensions for CSV files

func (*CSVPlugin) ExtractMetadata

func (p *CSVPlugin) ExtractMetadata(content string, path string) (model.FileMetadata, error)

ExtractMetadata extracts metadata from CSV content

func (*CSVPlugin) Name

func (p *CSVPlugin) Name() string

Name returns "csv" as the language name

type CSVStructure

type CSVStructure struct {
	Headers     []string
	Records     [][]string
	Delimiter   rune
	HasHeaders  bool
	RowCount    int
	ColumnCount int
}

CSVStructure represents the analyzed structure of a CSV file

Jump to

Keyboard shortcuts

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