Documentation ¶
Overview ¶
Package pathutils holds path utils related files
Index ¶
- func BuildPatterns(ruleset []*rules.RuleDefinition) []*rules.RuleDefinition
- func CheckForPatterns(path string) string
- func PathPatternBuilder(pattern string, path string, opts PathPatternMatchOpts) (string, bool)
- func PathPatternMatch(pattern string, path string, opts PathPatternMatchOpts) bool
- type PathPatternMatchOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPatterns ¶
func BuildPatterns(ruleset []*rules.RuleDefinition) []*rules.RuleDefinition
BuildPatterns find and build patterns for the path in the ruleset
func CheckForPatterns ¶
CheckForPatterns replace patterns like uuid with *
func PathPatternBuilder ¶
func PathPatternBuilder(pattern string, path string, opts PathPatternMatchOpts) (string, bool)
PathPatternBuilder pattern builder for files
func PathPatternMatch ¶
func PathPatternMatch(pattern string, path string, opts PathPatternMatchOpts) bool
PathPatternMatch pattern builder for files
Types ¶
type PathPatternMatchOpts ¶
type PathPatternMatchOpts struct { WildcardLimit int // max number of wildcard in the pattern PrefixNodeRequired int // number of prefix nodes required SuffixNodeRequired int // number of suffix nodes required NodeSizeLimit int // min size required to substitute with a wildcard }
PathPatternMatchOpts PathPatternMatch options
Click to show internal directories.
Click to hide internal directories.