[go] net: eliminate bounds checks in hasUpperCase

7 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Mar 24, 2026, 6:11:15 AMMar 24
to goph...@pubsubhelper.golang.org, jub0bs, golang-co...@googlegroups.com

Gerrit Bot has uploaded the change for review

Commit message

net: eliminate bounds checks in hasUpperCase

Function hasUpperCase accesses its parameter's bytes while iterating over
its runes. This approach muddles intent and causes an unnecessary bounds
check.

This CL makes hasUpperCase iterate over its parameter's bytes instead.

Updates #76354
Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
GitHub-Last-Rev: 152ccbb57dab0efd71e85c9d477e40a22574e7f3
GitHub-Pull-Request: golang/go#78311

Change diff

diff --git a/src/net/parse.go b/src/net/parse.go
index 106a303d..7495ccf 100644
--- a/src/net/parse.go
+++ b/src/net/parse.go
@@ -182,8 +182,8 @@

// hasUpperCase tells whether the given string contains at least one upper-case.
func hasUpperCase(s string) bool {
- for i := range s {
- if 'A' <= s[i] && s[i] <= 'Z' {
+ for _, b := range []byte(s) {
+ if 'A' <= b && b <= 'Z' {
return true
}
}

Change information

Files:
  • M src/net/parse.go
Change size: XS
Delta: 1 file changed, 2 insertions(+), 2 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
Gerrit-Change-Number: 758600
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Ian Lance Taylor (Gerrit)

unread,
Mar 24, 2026, 6:17:54 AMMar 24
to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com

Ian Lance Taylor added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Ian Lance Taylor . resolved

I think the current code is fine, though it could use a comment.

If we're going to change it I think it would be clearer to write

    for i := range s

rather than the explicit conversion to []byte, and it could still use a comment.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
Gerrit-Change-Number: 758600
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
Gerrit-Comment-Date: Tue, 24 Mar 2026 10:17:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Gerrit Bot (Gerrit)

unread,
Mar 24, 2026, 6:22:42 AMMar 24
to jub0bs, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded new patchset

Gerrit Bot uploaded patch set #2 to this change.
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
Gerrit-Change-Number: 758600
Gerrit-PatchSet: 2
unsatisfied_requirement
satisfied_requirement
open
diffy

jub0bs (Gerrit)

unread,
Mar 24, 2026, 6:33:47 AMMar 24
to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com

jub0bs added 1 comment

Patchset-level comments
File-level comment, Patchset 1:
Ian Lance Taylor . unresolved

I think the current code is fine, though it could use a comment.

If we're going to change it I think it would be clearer to write

    for i := range s

rather than the explicit conversion to []byte, and it could still use a comment.

jub0bs

I'm not following you...

```


for i := range s

```

is the current code.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
    Gerrit-Change-Number: 758600
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 10:33:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
    unsatisfied_requirement
    open
    diffy

    jub0bs (Gerrit)

    unread,
    Mar 24, 2026, 6:36:25 AMMar 24
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com

    jub0bs added 1 comment

    Patchset-level comments
    Ian Lance Taylor . unresolved

    I think the current code is fine, though it could use a comment.

    If we're going to change it I think it would be clearer to write

        for i := range s

    rather than the explicit conversion to []byte, and it could still use a comment.

    jub0bs

    I'm not following you...

    ```
    for i := range s
    ```

    is the current code.

    jub0bs

    Did you mean

    ```
    for _, r := range s
    ```

    perhaps? If so, I'm not sure why we should pay the price for decoding runes here.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
    Gerrit-Change-Number: 758600
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 10:36:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: jub0bs <jub0bsin...@gmail.com>
    unsatisfied_requirement
    open
    diffy

    Ian Lance Taylor (Gerrit)

    unread,
    Mar 24, 2026, 6:52:03 AMMar 24
    to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com

    Ian Lance Taylor added 1 comment

    Patchset-level comments
    Ian Lance Taylor . unresolved

    I think the current code is fine, though it could use a comment.

    If we're going to change it I think it would be clearer to write

        for i := range s

    rather than the explicit conversion to []byte, and it could still use a comment.

    jub0bs

    I'm not following you...

    ```
    for i := range s
    ```

    is the current code.

    jub0bs

    Did you mean

    ```
    for _, r := range s
    ```

    perhaps? If so, I'm not sure why we should pay the price for decoding runes here.

    Ian Lance Taylor

    Whoops, apologies, I meant to write

        For I := range len(s)
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
    Gerrit-Change-Number: 758600
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 10:51:58 +0000
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Mar 24, 2026, 7:11:24 AMMar 24
    to jub0bs, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #3 to this change.
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
    Gerrit-Change-Number: 758600
    Gerrit-PatchSet: 3
    unsatisfied_requirement
    open
    diffy

    jub0bs (Gerrit)

    unread,
    Mar 24, 2026, 7:12:01 AMMar 24
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com
    Attention needed from Ian Lance Taylor

    jub0bs added 1 comment

    Patchset-level comments
    File-level comment, Patchset 1:
    Ian Lance Taylor . resolved

    I think the current code is fine, though it could use a comment.

    If we're going to change it I think it would be clearer to write

        for i := range s

    rather than the explicit conversion to []byte, and it could still use a comment.

    jub0bs

    I'm not following you...

    ```
    for i := range s
    ```

    is the current code.

    jub0bs

    Did you mean

    ```
    for _, r := range s
    ```

    perhaps? If so, I'm not sure why we should pay the price for decoding runes here.

    Ian Lance Taylor

    Whoops, apologies, I meant to write

        For I := range len(s)
    jub0bs

    Ok. I'm happy with either with either approach.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ian Lance Taylor
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 2
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Tue, 24 Mar 2026 11:11:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
      Comment-In-Reply-To: jub0bs <jub0bsin...@gmail.com>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Olivier Mengué (Gerrit)

      unread,
      Apr 2, 2026, 7:07:39 PMApr 2
      to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      Olivier Mengué voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Thu, 02 Apr 2026 23:07:31 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Daniel Martí (Gerrit)

      unread,
      Apr 7, 2026, 7:57:50 AMApr 7
      to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      Daniel Martí voted Code-Review+2

      Code-Review+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Tue, 07 Apr 2026 11:57:42 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jorropo (Gerrit)

      unread,
      Apr 7, 2026, 9:31:16 AMApr 7
      to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Daniel Martí, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      Jorropo voted and added 1 comment

      Votes added by Jorropo

      Auto-Submit+1
      Code-Review+2

      1 comment

      File src/net/parse.go
      Line 185, Patchset 3 (Latest): for i := range len(s) {
      Jorropo . resolved

      Your patch looks ridiculous.
      I'll submit a CL to fix the compiler. This looks silly (it's not, due to how `range string(s)` is implemented but still looks silly).

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Tue, 07 Apr 2026 13:31:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      jub0bs (Gerrit)

      unread,
      Apr 7, 2026, 9:49:44 AMApr 7
      to Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Daniel Martí, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      jub0bs added 1 comment

      File src/net/parse.go
      Line 185, Patchset 3 (Latest): for i := range len(s) {
      Jorropo . unresolved

      Your patch looks ridiculous.
      I'll submit a CL to fix the compiler. This looks silly (it's not, due to how `range string(s)` is implemented but still looks silly).

      jub0bs

      I'm not sure how to respond to that... But if it can be fixed at the compiler level, I'm all for it.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Tue, 07 Apr 2026 13:49:36 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jorropo <jorro...@gmail.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniel Martí (Gerrit)

      unread,
      Apr 7, 2026, 9:53:04 AMApr 7
      to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      Daniel Martí added 1 comment

      File src/net/parse.go
      Line 185, Patchset 3 (Latest): for i := range len(s) {
      Jorropo . unresolved

      Your patch looks ridiculous.
      I'll submit a CL to fix the compiler. This looks silly (it's not, due to how `range string(s)` is implemented but still looks silly).

      jub0bs

      I'm not sure how to respond to that... But if it can be fixed at the compiler level, I'm all for it.

      Daniel Martí

      I hope Jorropo just means that it should be unnecessary as long as we fix the compiler. But I still think that the new code is slightly better. You're looping over the bytes, not the characters. So IMHO we still want to merge this regardless.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Tue, 07 Apr 2026 13:52:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jorropo <jorro...@gmail.com>
      Comment-In-Reply-To: jub0bs <jub0bsin...@gmail.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jorropo (Gerrit)

      unread,
      Apr 7, 2026, 10:15:37 AMApr 7
      to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Daniel Martí, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor and jub0bs

      Jorropo added 1 comment

      File src/net/parse.go
      Line 185, Patchset 3 (Latest): for i := range len(s) {
      Jorropo . resolved

      Your patch looks ridiculous.
      I'll submit a CL to fix the compiler. This looks silly (it's not, due to how `range string(s)` is implemented but still looks silly).

      jub0bs

      I'm not sure how to respond to that... But if it can be fixed at the compiler level, I'm all for it.

      Daniel Martí

      I hope Jorropo just means that it should be unnecessary as long as we fix the compiler. But I still think that the new code is slightly better. You're looping over the bytes, not the characters. So IMHO we still want to merge this regardless.

      Jorropo

      @mv...@mvdan.cc you're impressively good at Jorropo to English translations.

      @jub0bsin...@gmail.com this wasn't anything you had to respond to 😊
      I was basically saying thanks for finding a new compiler test case.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      • jub0bs
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Tue, 07 Apr 2026 14:15:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jorropo <jorro...@gmail.com>
      Comment-In-Reply-To: jub0bs <jub0bsin...@gmail.com>
      Comment-In-Reply-To: Daniel Martí <mv...@mvdan.cc>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniel Martí (Gerrit)

      unread,
      May 29, 2026, 3:49:29 AM (9 days ago) May 29
      to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor and jub0bs

      Daniel Martí added 1 comment

      File src/net/parse.go
      Line 185, Patchset 3 (Latest): for i := range len(s) {
      Jorropo . unresolved

      Your patch looks ridiculous.
      I'll submit a CL to fix the compiler. This looks silly (it's not, due to how `range string(s)` is implemented but still looks silly).

      jub0bs

      I'm not sure how to respond to that... But if it can be fixed at the compiler level, I'm all for it.

      Daniel Martí

      I hope Jorropo just means that it should be unnecessary as long as we fix the compiler. But I still think that the new code is slightly better. You're looping over the bytes, not the characters. So IMHO we still want to merge this regardless.

      Jorropo

      @mv...@mvdan.cc you're impressively good at Jorropo to English translations.

      @jub0bsin...@gmail.com this wasn't anything you had to respond to 😊
      I was basically saying thanks for finding a new compiler test case.

      Daniel Martí

      @jorro...@gmail.com did you end up raising a CL or issue about the compiler improvement? if you did then I think we can abandon this; if it's not feasible then I think we should submit this.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      • jub0bs
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Fri, 29 May 2026 07:49:22 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      jub0bs (Gerrit)

      unread,
      Jun 6, 2026, 6:58:15 AM (19 hours ago) Jun 6
      to Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Daniel Martí, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      jub0bs added 1 comment

      File src/net/parse.go
      Line 185, Patchset 3 (Latest): for i := range len(s) {
      Jorropo . unresolved

      Your patch looks ridiculous.
      I'll submit a CL to fix the compiler. This looks silly (it's not, due to how `range string(s)` is implemented but still looks silly).

      jub0bs

      I'm not sure how to respond to that... But if it can be fixed at the compiler level, I'm all for it.

      Daniel Martí

      I hope Jorropo just means that it should be unnecessary as long as we fix the compiler. But I still think that the new code is slightly better. You're looping over the bytes, not the characters. So IMHO we still want to merge this regardless.

      Jorropo

      @mv...@mvdan.cc you're impressively good at Jorropo to English translations.

      @jub0bsin...@gmail.com this wasn't anything you had to respond to 😊
      I was basically saying thanks for finding a new compiler test case.

      Daniel Martí

      @jorro...@gmail.com did you end up raising a CL or issue about the compiler improvement? if you did then I think we can abandon this; if it's not feasible then I think we should submit this.

      jub0bs

      I'm inclined to agree with @mv...@mvdan.cc. Future compiler improvements may well render this change unnecessary, but iterating over bytes rather than over runes makes more sense in this instance anyway.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Sat, 06 Jun 2026 10:58:06 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniel Martí (Gerrit)

      unread,
      Jun 6, 2026, 1:54:49 PM (12 hours ago) Jun 6
      to jub0bs, Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Olivier Mengué, Ian Lance Taylor, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      Daniel Martí voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ica403cf35c151dcdd46c98fb55984d4afd3fe871
      Gerrit-Change-Number: 758600
      Gerrit-PatchSet: 3
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
      Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
      Gerrit-Reviewer: Olivier Mengué <olivier...@gmail.com>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: jub0bs <jub0bsin...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Sat, 06 Jun 2026 17:54:41 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages