filter

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package filter implements three-tier path matching: exact, symlink, and substring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matches

func Matches(pathFilter string, strictMatch bool, cwd string) bool

Matches reports whether cwd should be included given pathFilter and strictMatch.

Algorithm (evaluated in order, stop at first match):

  1. Resolve pathFilter to absolute path.
  2. If the resolved path exists: a. Exact match: resolved == cwd b. Symlink match: realpath(resolved) == realpath(cwd) c. Resolved substring (non-strict only, min len 10): resolved in cwd or in realpath(cwd)
  3. Raw substring fallback (min len 3): pathFilter in cwd - Allowed in non-strict mode always. - Allowed in strict mode only when resolved path does NOT exist on disk.

If pathFilter is empty, all sessions match.

Types

This section is empty.

Jump to

Keyboard shortcuts

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