document

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 1 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 {
	URI     string
	Content string
}

Document holds the text content of an open file.

type Store

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

Store is a thread-safe map from document URI to Document.

func New

func New() *Store

New returns an initialized Store.

func (*Store) Close

func (s *Store) Close(uri string)

Close removes a document from the store.

func (*Store) Get

func (s *Store) Get(uri string) (string, bool)

Get retrieves a document by URI. Returns ("", false) if not found.

func (*Store) Open

func (s *Store) Open(uri, text string)

Open stores a newly opened document.

func (*Store) Update

func (s *Store) Update(uri, text string)

Update replaces the content of an existing document.

Jump to

Keyboard shortcuts

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