LGTM. Less magic numbers is always better. On Wed, Feb 6, 2013 at 9:23 PM, ...
12 years, 1 month ago
(2013-02-06 10:28:50 UTC)
#2
LGTM. Less magic numbers is always better.
On Wed, Feb 6, 2013 at 9:23 PM, <mikioh.mikioh@gmail.com> wrote:
> Reviewers: golang-dev_googlegroups.com,
>
> Message:
> Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),
>
> I'd like you to review this change to
> https://code.google.com/p/go.net
>
>
> Description:
> go.net/proxy: make use of constants
>
> Please review this at https://codereview.appspot.com/7299056/
>
> Affected files:
> M proxy/socks5.go
>
>
> Index: proxy/socks5.go
> ===================================================================
> --- a/proxy/socks5.go
> +++ b/proxy/socks5.go
> @@ -175,9 +175,9 @@
> bytesToDiscard := 0
> switch buf[3] {
> case socks5IP4:
> - bytesToDiscard = 4
> + bytesToDiscard = net.IPv4len
> case socks5IP6:
> - bytesToDiscard = 16
> + bytesToDiscard = net.IPv6len
> case socks5Domain:
> _, err := io.ReadFull(conn, buf[:1])
> if err != nil {
>
>
> --
>
> ---You received this message because you are subscribed to the Google Groups
> "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
*** Submitted as https://code.google.com/p/go/source/detail?r=96403c39f5d0&repo=net *** go.net/proxy: make use of constants R=golang-dev, dave CC=golang-dev https://codereview.appspot.com/7299056
12 years, 1 month ago
(2013-02-06 10:33:13 UTC)
#3
Issue 7299056: code review 7299056: go.net/proxy: make use of constants
(Closed)
Created 12 years, 1 month ago by mikio
Modified 12 years, 1 month ago
Reviewers:
Base URL:
Comments: 0