read

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(root *file.Root) tool.Tool

New builds the read tool confined to root.

func Render

func Render(args Args) (string, string)

Render describes a read as the path, qualified by the lines it asks for.

Types

type Args

type Args struct {
	Path   string `json:"path"`   // the file to read
	Offset int    `json:"offset"` // the first line
	Limit  int    `json:"limit"`  // the most lines to return
}

Args is what a read takes. An absent offset or limit is zero, which means the whole file.

Jump to

Keyboard shortcuts

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