document

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Path    string
	Content string
	Lines   []string
	Hash    string
	Known   map[int]bool // nil for complete documents
}

func FromContent

func FromContent(path string, data []byte) *Document

FromContent builds a document from content supplied by another source.

func Load

func Load(path string) (*Document, error)

func (*Document) HasLine

func (d *Document) HasLine(n int) bool

func (*Document) LineAt

func (d *Document) LineAt(n int) string

func (*Document) LineCount

func (d *Document) LineCount() int

Jump to

Keyboard shortcuts

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