Skip to content

Commit

Permalink
pattern: fix outdated comment, and add godoc links
Browse files Browse the repository at this point in the history
TranslatePattern and QuotePattern were renamed Regexp and QuoteMeta
in 2019 when code was moved out "syntax" package to "pattern" one.

See 2e72e3c
  • Loading branch information
ccoVeille authored and mvdan committed Jan 2, 2025
1 parent 86363cf commit 2cb3917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pattern/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ func charClass(s string) (string, error) {
// For example, HasMeta(`foo\*bar`) returns false, but HasMeta(`foo*bar`)
// returns true.
//
// This can be useful to avoid extra work, like TranslatePattern. Note that this
// function cannot be used to avoid QuotePattern, as backslashes are quoted by
// This can be useful to avoid extra work, like [Regexp]. Note that this
// function cannot be used to avoid [QuoteMeta], as backslashes are quoted by
// that function but ignored here.
func HasMeta(pat string, mode Mode) bool {
for i := 0; i < len(pat); i++ {
Expand Down

0 comments on commit 2cb3917

Please sign in to comment.