diff options
author | cui fliter <imcusg@gmail.com> | 2023-11-03 19:41:55 +0800 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-02-26 20:50:01 +0000 |
commit | 65172c2036d6b084f8a9cd3dcea926961070dcda (patch) | |
tree | 0a39890475a810411663964bed8f42824a25d848 /src/regexp | |
parent | cab90c84d12c630d3cf86caee6f686857485d483 (diff) | |
download | go-65172c2036d6b084f8a9cd3dcea926961070dcda.tar.gz go-65172c2036d6b084f8a9cd3dcea926961070dcda.zip |
regexp: add available godoc link
Signed-off-by: cui fliter <imcusg@gmail.com>
Change-Id: I85339293d4cfb691125f991ec7162e9be186efdc
Reviewed-on: https://go-review.googlesource.com/c/go/+/539599
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/regexp')
-rw-r--r-- | src/regexp/regexp.go | 2 | ||||
-rw-r--r-- | src/regexp/syntax/prog.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/regexp/regexp.go b/src/regexp/regexp.go index 462f235b1b..d1218ad0e8 100644 --- a/src/regexp/regexp.go +++ b/src/regexp/regexp.go @@ -1074,7 +1074,7 @@ func (re *Regexp) FindReaderSubmatchIndex(r io.RuneReader) []int { const startSize = 10 // The size at which to start a slice in the 'All' routines. -// FindAll is the 'All' version of Find; it returns a slice of all successive +// FindAll is the 'All' version of [Regexp.Find]; it returns a slice of all successive // matches of the expression, as defined by the 'All' description in the // package comment. // A return value of nil indicates no match. diff --git a/src/regexp/syntax/prog.go b/src/regexp/syntax/prog.go index d69ae1a12d..6a3705ec8f 100644 --- a/src/regexp/syntax/prog.go +++ b/src/regexp/syntax/prog.go @@ -191,7 +191,7 @@ Loop: const noMatch = -1 // MatchRune reports whether the instruction matches (and consumes) r. -// It should only be called when i.Op == InstRune. +// It should only be called when i.Op == [InstRune]. func (i *Inst) MatchRune(r rune) bool { return i.MatchRunePos(r) != noMatch } @@ -200,7 +200,7 @@ func (i *Inst) MatchRune(r rune) bool { // If so, MatchRunePos returns the index of the matching rune pair // (or, when len(i.Rune) == 1, rune singleton). // If not, MatchRunePos returns -1. -// MatchRunePos should only be called when i.Op == InstRune. +// MatchRunePos should only be called when i.Op == [InstRune]. func (i *Inst) MatchRunePos(r rune) int { rune := i.Rune @@ -262,7 +262,7 @@ func (i *Inst) MatchRunePos(r rune) int { // MatchEmptyWidth reports whether the instruction matches // an empty string between the runes before and after. -// It should only be called when i.Op == InstEmptyWidth. +// It should only be called when i.Op == [InstEmptyWidth]. func (i *Inst) MatchEmptyWidth(before rune, after rune) bool { switch EmptyOp(i.Arg) { case EmptyBeginLine: |