A fast, allocation-free Go library for simple wildcard pattern matching as an alternative to regex and filepath.Match.
Go-wildcard is a Go library for fast and lightweight wildcard pattern matching. It provides a simple alternative to regex and filepath.Match, focusing on performance and minimal resource usage without dependencies.
Go developers needing efficient wildcard matching for tasks like string filtering, pattern validation, or file-like path matching without regex overhead.
Developers choose Go-wildcard for its speed, allocation-free design, and simplicity compared to regex or filepath.Match, making it ideal for performance-sensitive applications.
🚀 Fast and light wildcard pattern matching.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks in the README show significant speed improvements over regex and filepath.Match, with optimized byte and rune comparison methods.
Operates without memory allocations, making it efficient for resource-constrained environments, as highlighted in the key features.
Offers easy-to-use functions like Match, MatchByRune, and MatchFromByte, with clear examples and no external dependencies.
Self-contained library with zero external dependencies, reducing bloat and compatibility issues, as stated in the description.
Only supports basic wildcards (*, ?, .), lacking advanced regex capabilities like character sets or quantifiers, which restricts complex matching needs.
Match function can't properly handle runes with multiple byte representations, and MatchByRune doesn't support grapheme clusters, as warned in the README examples.
Missing equivalent to FNM_FILE_NAME, making it unsuitable for accurate file path matching without additional work, as admitted in the warnings section.