custombait

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package custombait validates user-selected file bait paths and derives stable event identifiers for them.

Index

Constants

View Source
const (
	Pack     = "custom"
	MaxPaths = 128
)

Variables

This section is empty.

Functions

func Excluded

func Excluded(path string, exclusions []string) bool

Excluded reports whether path is in an exact exclusion list.

func Label

func Label(path string) string

Label returns a deterministic label derived from path.

func Normalize

func Normalize(field string, paths []string) ([]string, error)

Normalize validates paths, removes duplicates, and preserves order.

func Validate

func Validate(path string) error

Validate accepts a clean, slash-separated path relative to HOME.

func ValidateLayout

func ValidateLayout(field string, paths, reservedLeaves, reservedDirs []string, caseFold bool) error

ValidateLayout rejects paths that would overlap another bait or block a reserved file or directory. Reserved directories may contain custom baits, but cannot themselves be replaced by one.

func Without

func Without(paths, exclusions []string) []string

Without returns paths with exact exclusions removed, preserving order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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