From 51a293e4e78765bd0075c9280e7546a3823a7952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=BF?= Date: Thu, 15 Feb 2024 18:33:22 +0800 Subject: [PATCH] golint: redundant type from array, slice, or map composite literal (#601) Signed-off-by: wangqing Co-authored-by: wangqing --- net_tcp_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net_tcp_test.go b/net_tcp_test.go index a32e2fbf8..5ff33ef35 100644 --- a/net_tcp_test.go +++ b/net_tcp_test.go @@ -30,7 +30,7 @@ func Test_newNetTCP(t *testing.T) { name: "tcp file found, no error should come up", file: "testdata/fixtures/proc/net/tcp", want: []*netIPSocketLine{ - &netIPSocketLine{ + { Sl: 0, LocalAddr: net.IP{10, 0, 0, 5}, LocalPort: 22, @@ -42,7 +42,7 @@ func Test_newNetTCP(t *testing.T) { UID: 0, Inode: 2740, }, - &netIPSocketLine{ + { Sl: 1, LocalAddr: net.IP{0, 0, 0, 0}, LocalPort: 22, @@ -54,7 +54,7 @@ func Test_newNetTCP(t *testing.T) { UID: 0, Inode: 2740, }, - &netIPSocketLine{ + { Sl: 2, LocalAddr: net.IP{0, 0, 0, 0}, LocalPort: 22, @@ -73,7 +73,7 @@ func Test_newNetTCP(t *testing.T) { name: "tcp6 file found, no error should come up", file: "testdata/fixtures/proc/net/tcp6", want: []*netIPSocketLine{ - &netIPSocketLine{ + { Sl: 1315, LocalAddr: net.IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, LocalPort: 5355, @@ -85,7 +85,7 @@ func Test_newNetTCP(t *testing.T) { UID: 981, Inode: 21040, }, - &netIPSocketLine{ + { Sl: 6073, LocalAddr: net.IP{254, 128, 0, 0, 0, 0, 0, 0, 86, 225, 173, 255, 254, 124, 102, 9}, LocalPort: 51073,