1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
package main
func init() {
addTestCases(netdialTests)
}
var netdialTests = []testCase{
{
Name: "netdial.0",
In: `package main
import "net"
func f() {
c, err := net.Dial(net, "", addr)
c, err = net.Dial(net, "", addr)
}
`,
Out: `package main
import "net"
func f() {
c, err := net.Dial(net, addr)
c, err = net.Dial(net, addr)
}
`,
},
{
Name: "netlookup.0",
In: `package main
import "net"
func f() {
foo, bar, _ := net.LookupHost(host)
foo, bar, _ = net.LookupHost(host)
}
`,
Out: `package main
import "net"
func f() {
foo, bar := net.LookupHost(host)
foo, bar = net.LookupHost(host)
}
`,
},
}
|