Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
Looks good, tests pass under linux/amd64 http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/iprawsock_posix.go File src/pkg/net/iprawsock_posix.go (right): http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/iprawsock_posix.g... src/pkg/net/iprawsock_posix.go:220: return "", 0, err It's more common to use return\n here if your return arguments are declared in the method signature. http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_unix.go File src/pkg/net/lookup_unix.go (right): http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_unix.go#ne... src/pkg/net/lookup_unix.go:46: func lookupProtocol(name string) (proto int, err os.Error) { You probably don't need to name the return arguments here. http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_windows.go File src/pkg/net/lookup_windows.go (right): http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_windows.go... src/pkg/net/lookup_windows.go:21: func lookupProtocol(name string) (proto int, err os.Error) { Drop the named arguments if you aren't going to refer to them in the method body.
Hello golang-dev@googlegroups.com, dave@cheney.net (cc: golang-dev@googlegroups.com), Please take another look.
Thank you for review. http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/iprawsock_posix.go File src/pkg/net/iprawsock_posix.go (right): http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/iprawsock_posix.g... src/pkg/net/iprawsock_posix.go:220: return "", 0, err I always try to specify return values explicitly. This way I don't need to guess what I am returning here. I also don't have to worry about shadowed variables. In this particular instance, I am fixing a bug that, I believe, was caused by an empty return statement. http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_unix.go File src/pkg/net/lookup_unix.go (right): http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_unix.go#ne... src/pkg/net/lookup_unix.go:46: func lookupProtocol(name string) (proto int, err os.Error) { I would like to keep this function similar to others in this file. I have changed return statement instead. http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_windows.go File src/pkg/net/lookup_windows.go (right): http://codereview.appspot.com/5248055/diff/5001/src/pkg/net/lookup_windows.go... src/pkg/net/lookup_windows.go:21: func lookupProtocol(name string) (proto int, err os.Error) { Again, I would like to keep this function similar to others.
LGTM
*** Submitted as http://code.google.com/p/go/source/detail?r=f449f935da49 *** net: implement ip protocol name to number resolver for windows Fixes issue 2215. Fixes issue 2216. R=golang-dev, dave, rsc CC=golang-dev http://codereview.appspot.com/5248055