search

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package search provides full-text grep-style search over vault files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripVaultPrefix

func StripVaultPrefix(path string, cfg *config.Config) string

StripVaultPrefix removes the vault path prefix for display.

Types

type FileMatch

type FileMatch struct {
	File         string
	FirstLine    int
	FirstContent string
}

FileMatch represents a file that contains matches with its first match for context.

func Search(pattern string, dirs []string) ([]FileMatch, error)

Search searches directories recursively for a pattern, returning matching files with context (first matching line).

type Result

type Result struct {
	File    string
	Line    int
	Content string
}

Result represents a single search match.

Jump to

Keyboard shortcuts

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