atfile

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Pattern = regexp.MustCompile(`@(\.{0,2}[/\\]?[\w.\-/\\]+\.\w+)`)

Pattern matches @path/to/file references in user input.

Functions

func Expand

func Expand(input string) (string, []string)

Expand replaces @file references with inlined file contents.

Types

type Candidate

type Candidate struct {
	Path string `json:"path"`
	Name string `json:"name"`
	Dir  string `json:"dir"`
}

Candidate is a file match for @-mention autocomplete.

func Search(root, query string, limit int) []Candidate

Search finds files under root whose path contains query (case-insensitive).

Jump to

Keyboard shortcuts

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