Skip to content

Commit

Permalink
golint: redundant type from array, slice, or map composite literal (#601
Browse files Browse the repository at this point in the history
)

Signed-off-by: wangqing <wangqing@uniontech.com>
Co-authored-by: wangqing <wangqing@uniontech.com>
  • Loading branch information
wangqingfree and wangqing committed Feb 15, 2024
1 parent d735b08 commit 51a293e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions net_tcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 51a293e

Please sign in to comment.