usnfilter

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package usnfilter provides convenient USN filtering functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And

func And(filters ...usn.Filter) usn.Filter

And creates a new filter that returns true only when each filter in filters returns true.

If filters is empty, nil, or composed solely of nil filters, a nil filter will be returned.

func IsDir

func IsDir(record usn.Record) bool

IsDir is a filter that returns true returns true when a record represents a directory.

func Not

func Not(filter usn.Filter) usn.Filter

Not returns a new filter that returns true only when the given filter does not.

func Or

func Or(filters ...usn.Filter) usn.Filter

Or creates a new filter that returns true when at least one of the given filters returns true.

If filters is empty, nil, or composed solely of nil filters, a nil filter will be returned.

func PathContains

func PathContains(substr string) usn.Filter

PathContains returns a filter that returns true when a record's path contains the given substring. If the record does not specify a path its filename will be used instead. The match is case-insensitive.

func PathPrefix

func PathPrefix(prefix string) usn.Filter

PathPrefix returns a filter that returns true when a record's path starts with the given prefix. If the record does not specify a path its filename will be used instead. The match is case-insensitive.

func PathRegexp

func PathRegexp(re *regexp.Regexp) usn.Filter

PathRegexp returns a filter that returns true when records have a filename or path matching the given regular expression.

Types

This section is empty.

Jump to

Keyboard shortcuts

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