Skip to content

Commit 51a293e

Browse files
wangqingfreewangqing
and
wangqing
authored
golint: redundant type from array, slice, or map composite literal (#601)
Signed-off-by: wangqing <[email protected]> Co-authored-by: wangqing <[email protected]>
1 parent d735b08 commit 51a293e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: net_tcp_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func Test_newNetTCP(t *testing.T) {
3030
name: "tcp file found, no error should come up",
3131
file: "testdata/fixtures/proc/net/tcp",
3232
want: []*netIPSocketLine{
33-
&netIPSocketLine{
33+
{
3434
Sl: 0,
3535
LocalAddr: net.IP{10, 0, 0, 5},
3636
LocalPort: 22,
@@ -42,7 +42,7 @@ func Test_newNetTCP(t *testing.T) {
4242
UID: 0,
4343
Inode: 2740,
4444
},
45-
&netIPSocketLine{
45+
{
4646
Sl: 1,
4747
LocalAddr: net.IP{0, 0, 0, 0},
4848
LocalPort: 22,
@@ -54,7 +54,7 @@ func Test_newNetTCP(t *testing.T) {
5454
UID: 0,
5555
Inode: 2740,
5656
},
57-
&netIPSocketLine{
57+
{
5858
Sl: 2,
5959
LocalAddr: net.IP{0, 0, 0, 0},
6060
LocalPort: 22,
@@ -73,7 +73,7 @@ func Test_newNetTCP(t *testing.T) {
7373
name: "tcp6 file found, no error should come up",
7474
file: "testdata/fixtures/proc/net/tcp6",
7575
want: []*netIPSocketLine{
76-
&netIPSocketLine{
76+
{
7777
Sl: 1315,
7878
LocalAddr: net.IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
7979
LocalPort: 5355,
@@ -85,7 +85,7 @@ func Test_newNetTCP(t *testing.T) {
8585
UID: 981,
8686
Inode: 21040,
8787
},
88-
&netIPSocketLine{
88+
{
8989
Sl: 6073,
9090
LocalAddr: net.IP{254, 128, 0, 0, 0, 0, 0, 0, 86, 225, 173, 255, 254, 124, 102, 9},
9191
LocalPort: 51073,

0 commit comments

Comments
 (0)