[go] net: update comments preceding IP.String to reflect RFC 5952 conformance status

8 views
Skip to first unread message

ZiZhao Zhang (Gerrit)

unread,
Jul 26, 2021, 12:34:21 AM7/26/21
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

ZiZhao Zhang has uploaded this change for review.

View Change

net: update comments preceding IP.String to reflect RFC 5952 conformance status

Fixes #44485

Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
---
M src/net/ip.go
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/net/ip.go b/src/net/ip.go
index 38e1aa2..6e01468 100644
--- a/src/net/ip.go
+++ b/src/net/ip.go
@@ -304,7 +304,7 @@
return 3
}

-// String returns the string form of the IP address ip.
+// String returns the string form of the IP address ip as defined in RFC 5952.
// It returns one of 4 forms:
// - "<nil>", if ip has length 0
// - dotted decimal ("192.0.2.1"), if ip is an IPv4 or IP4-mapped IPv6 address

To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
Gerrit-Change-Number: 337369
Gerrit-PatchSet: 1
Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-MessageType: newchange

Damien Neil (Gerrit)

unread,
Jul 26, 2021, 1:28:22 AM7/26/21
to ZiZhao Zhang, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Elliot Cameron, golang-co...@googlegroups.com

Attention is currently required from: Elliot Cameron, ZiZhao Zhang, Ian Lance Taylor.

View Change

1 comment:

  • File src/net/ip.go:

    • Patch Set #1, Line 307: // String returns the string form of the IP address ip as defined in RFC 5952.

      This isn't correct: RFC 5952 defines the text representation of IPv6 addresses, but IP.String returns one of three other forms when the IP does not contain an IPv6 address.

      I'm not certain that it's necessary for IP.String to reference RFC 5952, given that there are (to the best of my knowledge) no other text representations of IPv6 addresses in common use.

To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
Gerrit-Change-Number: 337369
Gerrit-PatchSet: 1
Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Damien Neil <dn...@google.com>
Gerrit-Attention: Elliot Cameron <eaca...@gmail.com>
Gerrit-Attention: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
Gerrit-Comment-Date: Mon, 26 Jul 2021 05:28:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Damien Neil (Gerrit)

unread,
Jul 26, 2021, 1:35:25 AM7/26/21
to ZiZhao Zhang, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Elliot Cameron, golang-co...@googlegroups.com

Attention is currently required from: Elliot Cameron, ZiZhao Zhang, Ian Lance Taylor.

View Change

1 comment:

  • File src/net/ip.go:

    • This isn't correct: RFC 5952 defines the text representation of IPv6 addresses, but IP. […]

      ...I suppose there are various non-canonical forms, such as 2001:db8:0:0:0:0:0:1, so specifying that the IPv6 representation conforms to RFC 5952 does have meaning.

      A question then is whether IP.String *should* be constrained to conform to RFC 5952. This does seems reasonable to me.

To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
Gerrit-Change-Number: 337369
Gerrit-PatchSet: 1
Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Damien Neil <dn...@google.com>
Gerrit-Attention: Elliot Cameron <eaca...@gmail.com>
Gerrit-Attention: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
Gerrit-Comment-Date: Mon, 26 Jul 2021 05:35:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Damien Neil <dn...@google.com>
Gerrit-MessageType: comment

ZiZhao Zhang (Gerrit)

unread,
Jul 26, 2021, 2:31:09 AM7/26/21
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Attention is currently required from: Elliot Cameron, ZiZhao Zhang, Ian Lance Taylor.

ZiZhao Zhang uploaded patch set #2 to this change.

View Change

net: update comments preceding IP.String to reflect RFC 5952 conformance status

Fixes #44485

Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
---
M src/net/ip.go
1 file changed, 1 insertion(+), 1 deletion(-)

To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
Gerrit-Change-Number: 337369
Gerrit-PatchSet: 2
Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Damien Neil <dn...@google.com>
Gerrit-Attention: Elliot Cameron <eaca...@gmail.com>
Gerrit-Attention: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
Gerrit-MessageType: newpatchset

ZiZhao Zhang (Gerrit)

unread,
Jul 26, 2021, 2:32:25 AM7/26/21
to goph...@pubsubhelper.golang.org, Damien Neil, Ian Lance Taylor, Elliot Cameron, golang-co...@googlegroups.com

Attention is currently required from: Elliot Cameron, Damien Neil, Ian Lance Taylor.

View Change

1 comment:

  • File src/net/ip.go:

    • ... […]

      Done

To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
Gerrit-Change-Number: 337369
Gerrit-PatchSet: 2
Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Damien Neil <dn...@google.com>
Gerrit-Attention: Elliot Cameron <eaca...@gmail.com>
Gerrit-Attention: Damien Neil <dn...@google.com>
Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
Gerrit-Comment-Date: Mon, 26 Jul 2021 06:32:20 +0000

Elliot Cameron

unread,
Jul 26, 2021, 12:23:44 PM7/26/21
to change...@go-review.googlesource.com, goph...@pubsubhelper.golang.org, Damien Neil, Ian Lance Taylor, golang-co...@googlegroups.com
I believe you meant to make Cameron Elliott a reviewer, and not me, Elliot Cameron.

Elliot Cameron (Gerrit)

unread,
Jul 26, 2021, 12:23:45 PM7/26/21
to ZiZhao Zhang, goph...@pubsubhelper.golang.org, Damien Neil, Ian Lance Taylor, golang-co...@googlegroups.com

Attention is currently required from: Elliot Cameron, Damien Neil, Ian Lance Taylor.

I believe you meant to make Cameron Elliott a reviewer, and not me, Elliot Cameron.

View Change

    To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
    Gerrit-Change-Number: 337369
    Gerrit-PatchSet: 2
    Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
    Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Damien Neil <dn...@google.com>
    Gerrit-Attention: Elliot Cameron <eaca...@gmail.com>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Mon, 26 Jul 2021 11:57:18 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    ZiZhao Zhang (Gerrit)

    unread,
    Jul 26, 2021, 9:32:35 PM7/26/21
    to goph...@pubsubhelper.golang.org, Damien Neil, Ian Lance Taylor, Elliot Cameron, golang-co...@googlegroups.com

    Attention is currently required from: Elliot Cameron, Damien Neil, Ian Lance Taylor.

    View Change

    1 comment:

      • I believe you meant to make Cameron Elliott a reviewer, and not me, Elliot Cameron.

      • ... sorry

    To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
    Gerrit-Change-Number: 337369
    Gerrit-PatchSet: 2
    Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
    Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Damien Neil <dn...@google.com>
    Gerrit-Attention: Elliot Cameron <eaca...@gmail.com>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Tue, 27 Jul 2021 01:32:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Damien Neil (Gerrit)

    unread,
    Aug 5, 2021, 2:10:27 PM8/5/21
    to ZiZhao Zhang, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Elliot Cameron, golang-co...@googlegroups.com

    Attention is currently required from: Elliot Cameron, ZiZhao Zhang, Ian Lance Taylor.

    View Change

    2 comments:

    • Patchset:

    • File src/net/ip.go:

      • Patch Set #2, Line 311: // - the IPv6 ("2001:db8::1") as defined in RFC 5952, if ip is a valid IPv6 address.

        No need for "the". No terminal period, for consistency with the other list items here. And let's move the example output to the end of the first clause:

        ```
        // - IPv6 as defined in RFC 5952 ("2001:db8::1") , if ip is a valid IPv6 address.
        ```

    To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
    Gerrit-Change-Number: 337369
    Gerrit-PatchSet: 2
    Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
    Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Damien Neil <dn...@google.com>
    Gerrit-Attention: Elliot Cameron <eaca...@gmail.com>
    Gerrit-Attention: ZiZhao Zhang <btw51...@gmail.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Thu, 05 Aug 2021 18:10:23 +0000

    ZiZhao Zhang (Gerrit)

    unread,
    Aug 9, 2021, 2:35:51 AM8/9/21
    to goph...@pubsubhelper.golang.org, Damien Neil, Ian Lance Taylor, Elliot Cameron, golang-co...@googlegroups.com

    ZiZhao Zhang abandoned this change.

    View Change

    Abandoned

    To view, visit change 337369. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I4b101e5d18cde30a66ab9a2c72704876827fff04
    Gerrit-Change-Number: 337369
    Gerrit-PatchSet: 2
    Gerrit-Owner: ZiZhao Zhang <btw51...@gmail.com>
    Gerrit-Reviewer: Elliot Cameron <eaca...@gmail.com>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Damien Neil <dn...@google.com>
    Gerrit-MessageType: abandon
    Reply all
    Reply to author
    Forward
    0 new messages