reader

package
v0.0.0-...-8df8562 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocxReader

type DocxReader struct{}

DocxReader implements the Reader interface for .docx files.

func NewDocxReader

func NewDocxReader() *DocxReader

NewDocxReader creates a new DocxReader.

func (*DocxReader) Extract

func (r *DocxReader) Extract(filePath string) (string, error)

Extract reads the content of a .docx file and returns it as plain text.

type PDFReader

type PDFReader struct{}

func NewPDFReader

func NewPDFReader() *PDFReader

func (*PDFReader) Extract

func (p *PDFReader) Extract(path string) (string, error)

type Reader

type Reader interface {
	Extract(path string) (string, error)
}

type TextReader

type TextReader struct{}

TextReader implements the Reader interface for plain text files (.txt).

func NewTextReader

func NewTextReader() *TextReader

NewTextReader creates a new TextReader.

func (*TextReader) Extract

func (r *TextReader) Extract(filePath string) (string, error)

Extract reads the content of a plain text file.

Jump to

Keyboard shortcuts

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