diff options
| author | nlwkobe30 <nlwkobe30@gmail.com> | 2024-08-30 19:05:07 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-09-03 20:55:15 +0000 |
| commit | 7cd0a4be5cdbb84142ec330daba6087eece48341 (patch) | |
| tree | 498439f59e7cf228c9427c540bccdc7c2930fe7c /src/regexp/syntax/parse.go | |
| parent | b8e533a7cdc60d84a0c52bfaf3dcb5bf148ac3a8 (diff) | |
| download | go-7cd0a4be5cdbb84142ec330daba6087eece48341.tar.xz | |
all: omit unnecessary 0 in slice expression
All changes are related to the code, except for the comments in src/regexp/syntax/parse.go and src/slices/slices.go.
Change-Id: I73c5d3c54099749b62210aa7f3182c5eb84bb6a6
GitHub-Last-Rev: 794aa9b0539811d00e1cd42be1e8d9fe9afe0281
GitHub-Pull-Request: golang/go#69170
Reviewed-on: https://go-review.googlesource.com/c/go/+/609678
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/regexp/syntax/parse.go')
| -rw-r--r-- | src/regexp/syntax/parse.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regexp/syntax/parse.go b/src/regexp/syntax/parse.go index 26242902f1..ed239dafdf 100644 --- a/src/regexp/syntax/parse.go +++ b/src/regexp/syntax/parse.go @@ -621,7 +621,7 @@ func (p *parser) factor(sub []*Regexp) []*Regexp { } // Found end of a run with common leading literal string: - // sub[start:i] all begin with str[0:len(str)], but sub[i] + // sub[start:i] all begin with str[:len(str)], but sub[i] // does not even begin with str[0]. // // Factor out common string and append factored expression to out. |
