filter

package
v0.0.0-...-32d9607 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitFile

func GitFile(filename string) bool

GitFile returns true if the given filename is in a git path.

func GoFile

func GoFile(filename string) bool

GoFile returns true if the given filename is a *.go file.

func TestFile

func TestFile(filename string) bool

TestFile returns true if the given filename is a test file.

func VendorFile

func VendorFile(filename string) bool

VendorFile returns true if the given filename is in a vendor path.

Types

type Matcher

type Matcher func(filename string) bool

Matcher is a handler for comparing if a filename matches some criteria.

func And

func And(matchers ...Matcher) Matcher

And returns true if all the matchers return true.

func Default

func Default() Matcher

Default is the default filter for Go packages.

func FileMatches

func FileMatches(expression string) Matcher

FileMatches returns true if the given filename is matched by the given regular expression.

func Not

func Not(matcher Matcher) Matcher

Not returns opposite result of the given matcher

func Or

func Or(matchers ...Matcher) Matcher

Or returns true if any of the matchers return true.

Jump to

Keyboard shortcuts

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