]> Cypherpunks repositories - gostls13.git/commitdiff
net: use short variable declaration
authorChristopher Wedgwood <cw@f00f.org>
Thu, 29 Apr 2010 18:02:10 +0000 (11:02 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 29 Apr 2010 18:02:10 +0000 (11:02 -0700)
R=rsc
CC=golang-dev
https://golang.org/cl/1019043

src/pkg/net/parse_test.go

index d011c00763a4fd02a7c2619e6bbef4a8ba574901..f53df3b6832201ce966c903a799959711e8e8888 100644 (file)
@@ -19,8 +19,7 @@ func TestReadLine(t *testing.T) {
        }
        br := bufio.NewReader(fd)
 
-       var file *file
-       file, err = open(filename)
+       file, err := open(filename)
        if file == nil {
                t.Fatalf("net.open(%s) = nil", filename)
        }