Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
path/filepath: always validate full Glob patterns #28614
_, err := filepath.Match("a[", "a") // err is nil _, err := filepath.Match("a[", "abc") // err is "syntax error in pattern"
As patterns are often user input, it would be handy to be able to validate the pattern. If the validation is successful, it should be guaranteed that
I created a PR for this here and was asked to open a proposal issue first.
Other programming languages seem to either not validate the pattern at all (like Python's