[go] net/url: add test case to ResolveReference

3 views
Skip to first unread message

kami sama (Gerrit)

unread,
Feb 4, 2026, 3:39:08 AM (3 days ago) Feb 4
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

kami sama has uploaded the change for review

Commit message

net/url: add test case to ResolveReference

This adds a test case to resolveReferenceTests to ensure that a
relative path is correctly appended to a base URL that ends with a
trailing slash.
Change-Id: I94ea65355bb96f23acff09a3992c9dcf6e47da60

Change diff

diff --git a/src/net/url/url_test.go b/src/net/url/url_test.go
index d099353..9ba2a12 100644
--- a/src/net/url/url_test.go
+++ b/src/net/url/url_test.go
@@ -1209,6 +1209,7 @@
{"http://foo.com", "bar", "http://foo.com/bar"},
{"http://foo.com/", "bar", "http://foo.com/bar"},
{"http://foo.com/bar/baz", "quux", "http://foo.com/bar/quux"},
+ {"http://foo.com/bar/baz/", "quux", "http://foo.com/bar/baz/quux"},

// ... going up
{"http://foo.com/bar/baz", "../quux", "http://foo.com/quux"},

Change information

Files:
  • M src/net/url/url_test.go
Change size: XS
Delta: 1 file changed, 1 insertion(+), 0 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: I94ea65355bb96f23acff09a3992c9dcf6e47da60
Gerrit-Change-Number: 741880
Gerrit-PatchSet: 1
Gerrit-Owner: kami sama <kamisama...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
Feb 4, 2026, 3:42:59 AM (3 days ago) Feb 4
to kami sama, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Message from Gopher Robot

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.

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: I94ea65355bb96f23acff09a3992c9dcf6e47da60
Gerrit-Change-Number: 741880
Gerrit-PatchSet: 1
Gerrit-Owner: kami sama <kamisama...@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Comment-Date: Wed, 04 Feb 2026 08:42:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Sean Liao (Gerrit)

unread,
Feb 6, 2026, 2:58:06 PM (11 hours ago) Feb 6
to kami sama, goph...@pubsubhelper.golang.org, Damien Neil, Russ Cox, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Damien Neil, Russ Cox and kami sama

Sean Liao added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Sean Liao . unresolved

This seems the same as what's on Line 1210

Open in Gerrit

Related details

Attention is currently required from:
  • Damien Neil
  • Russ Cox
  • kami sama
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: I94ea65355bb96f23acff09a3992c9dcf6e47da60
    Gerrit-Change-Number: 741880
    Gerrit-PatchSet: 1
    Gerrit-Owner: kami sama <kamisama...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-Reviewer: Russ Cox <r...@golang.org>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Sean Liao <se...@liao.dev>
    Gerrit-Attention: Russ Cox <r...@golang.org>
    Gerrit-Attention: kami sama <kamisama...@gmail.com>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 19:58:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Damien Neil (Gerrit)

    unread,
    Feb 6, 2026, 5:56:26 PM (8 hours ago) Feb 6
    to kami sama, goph...@pubsubhelper.golang.org, Russ Cox, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Russ Cox, Sean Liao and kami sama

    Damien Neil voted and added 1 comment

    Votes added by Damien Neil

    Commit-Queue+1

    1 comment

    Patchset-level comments
    Sean Liao . resolved

    This seems the same as what's on Line 1210

    Damien Neil

    It's a bit different, since there are some subtle differences between a path containing no segments and one containing at least one segment. Adding an additional case here seems reasonable enough.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Russ Cox
    • Sean Liao
    • kami sama
    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: I94ea65355bb96f23acff09a3992c9dcf6e47da60
      Gerrit-Change-Number: 741880
      Gerrit-PatchSet: 1
      Gerrit-Owner: kami sama <kamisama...@gmail.com>
      Gerrit-Reviewer: Damien Neil <dn...@google.com>
      Gerrit-Reviewer: Russ Cox <r...@golang.org>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Russ Cox <r...@golang.org>
      Gerrit-Attention: kami sama <kamisama...@gmail.com>
      Gerrit-Attention: Sean Liao <se...@liao.dev>
      Gerrit-Comment-Date: Fri, 06 Feb 2026 22:56:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Sean Liao <se...@liao.dev>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Damien Neil (Gerrit)

      unread,
      Feb 6, 2026, 6:13:28 PM (8 hours ago) Feb 6
      to kami sama, goph...@pubsubhelper.golang.org, Go LUCI, Russ Cox, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Russ Cox, Sean Liao and kami sama

      Damien Neil voted Code-Review+2

      Code-Review+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Russ Cox
      • Sean Liao
      • kami sama
      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: I94ea65355bb96f23acff09a3992c9dcf6e47da60
      Gerrit-Change-Number: 741880
      Gerrit-PatchSet: 1
      Gerrit-Owner: kami sama <kamisama...@gmail.com>
      Gerrit-Reviewer: Damien Neil <dn...@google.com>
      Gerrit-Reviewer: Russ Cox <r...@golang.org>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Russ Cox <r...@golang.org>
      Gerrit-Attention: kami sama <kamisama...@gmail.com>
      Gerrit-Attention: Sean Liao <se...@liao.dev>
      Gerrit-Comment-Date: Fri, 06 Feb 2026 23:13:25 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michael Pratt (Gerrit)

      unread,
      Feb 6, 2026, 6:31:22 PM (8 hours ago) Feb 6
      to kami sama, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Damien Neil, Russ Cox, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Russ Cox, Sean Liao and kami sama

      Michael Pratt voted

      Auto-Submit+1
      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Russ Cox
      • Sean Liao
      • kami sama
      Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        • requirement 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: I94ea65355bb96f23acff09a3992c9dcf6e47da60
        Gerrit-Change-Number: 741880
        Gerrit-PatchSet: 1
        Gerrit-Owner: kami sama <kamisama...@gmail.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
        Gerrit-Reviewer: Russ Cox <r...@golang.org>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-CC: Sean Liao <se...@liao.dev>
        Gerrit-Attention: Russ Cox <r...@golang.org>
        Gerrit-Attention: kami sama <kamisama...@gmail.com>
        Gerrit-Attention: Sean Liao <se...@liao.dev>
        Gerrit-Comment-Date: Fri, 06 Feb 2026 23:31:19 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Gopher Robot (Gerrit)

        unread,
        Feb 6, 2026, 6:34:07 PM (8 hours ago) Feb 6
        to kami sama, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Pratt, Go LUCI, Damien Neil, Russ Cox, golang-co...@googlegroups.com

        Gopher Robot submitted the change

        Change information

        Commit message:
        net/url: add test case to ResolveReference

        This adds a test case to resolveReferenceTests to ensure that a
        relative path is correctly appended to a base URL that ends with a
        trailing slash.
        Change-Id: I94ea65355bb96f23acff09a3992c9dcf6e47da60
        Reviewed-by: Michael Pratt <mpr...@google.com>
        Reviewed-by: Damien Neil <dn...@google.com>
        Auto-Submit: Michael Pratt <mpr...@google.com>
        Files:
        • M src/net/url/url_test.go
        Change size: XS
        Delta: 1 file changed, 1 insertion(+), 0 deletions(-)
        Branch: refs/heads/master
        Submit Requirements:
        • requirement satisfiedCode-Review: +2 by Damien Neil, +1 by Michael Pratt
        • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I94ea65355bb96f23acff09a3992c9dcf6e47da60
        Gerrit-Change-Number: 741880
        Gerrit-PatchSet: 2
        Gerrit-Owner: kami sama <kamisama...@gmail.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
        Gerrit-Reviewer: Russ Cox <r...@golang.org>
        Gerrit-CC: Sean Liao <se...@liao.dev>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages