Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. go-wildcard

go-wildcard

NOASSERTIONGov2.1.1

A fast, allocation-free Go library for simple wildcard pattern matching as an alternative to regex and filepath.Match.

GitHubGitHub
103 stars8 forks0 contributors

What is go-wildcard?

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.

Target Audience

Go developers needing efficient wildcard matching for tasks like string filtering, pattern validation, or file-like path matching without regex overhead.

Value Proposition

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.

Overview

🚀 Fast and light wildcard pattern matching.

Use Cases

Best For

  • Implementing fast string pattern matching in Go applications
  • Replacing regex for simple wildcard use cases
  • Filtering or validating strings with wildcard patterns
  • Performance-critical matching without memory allocations
  • Avoiding filepath.Match's filename-centric limitations
  • Lightweight pattern matching in embedded or resource-constrained environments

Not Ideal For

  • Projects needing complex regex features like character classes, anchors, or lookaheads
  • Applications requiring file path matching with platform-specific semantics (e.g., FNM_FILE_NAME)
  • Systems where strict Unicode grapheme cluster handling is critical
  • Teams seeking extensive ecosystem support or drop-in solutions for diverse pattern matching scenarios

Pros & Cons

Pros

Blazing Fast Performance

Benchmarks in the README show significant speed improvements over regex and filepath.Match, with optimized byte and rune comparison methods.

Allocation-Free Design

Operates without memory allocations, making it efficient for resource-constrained environments, as highlighted in the key features.

Simple API

Offers easy-to-use functions like Match, MatchByRune, and MatchFromByte, with clear examples and no external dependencies.

No Dependencies

Self-contained library with zero external dependencies, reducing bloat and compatibility issues, as stated in the description.

Cons

Limited Pattern Features

Only supports basic wildcards (*, ?, .), lacking advanced regex capabilities like character sets or quantifiers, which restricts complex matching needs.

Unicode Handling Limitations

Match function can't properly handle runes with multiple byte representations, and MatchByRune doesn't support grapheme clusters, as warned in the README examples.

No File Path Semantics

Missing equivalent to FNM_FILE_NAME, making it unsuitable for accurate file path matching without additional work, as admitted in the warnings section.

Frequently Asked Questions

Quick Stats

Stars103
Forks8
Contributors0
Open Issues1
Last commit1 month ago
CreatedSince 2021

Tags

#wildcard-matching#regex-alternative#go-library#lightweight#pattern-matching#string-matching#golang#go#performance

Built With

G
Go

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

coregexcoregex

Pure Go production-grade regex engine with SIMD optimizations. Up to 3-3000x+ faster than stdlib.

Stars242
Forks6
Last commit1 month ago
rexrex

Flexible regular expressions constructor for Golang.

Stars214
Forks5
Last commit23 days ago
regroupregroup

Match regex group into go struct using struct tags and automatic parsing

Stars150
Forks13
Last commit1 year ago
goregengoregen

randexp for Go.

Stars92
Forks24
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub