From 6f12b0c814b86c3d52f69c1e6163e660d01c9a9c Mon Sep 17 00:00:00 2001 From: Syed Parvez Date: Mon, 25 Mar 2024 07:20:48 +0530 Subject: [PATCH] nit: fixed lint errors --- pkg/rpc/convert_test.go | 58 +++++++++-------------------------------- 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/pkg/rpc/convert_test.go b/pkg/rpc/convert_test.go index 2506dcd97c20..ec305d7fc58f 100644 --- a/pkg/rpc/convert_test.go +++ b/pkg/rpc/convert_test.go @@ -53,12 +53,6 @@ func TestConvertToRpcPkgs(t *testing.T) { Digest: "sha256:6a428f9f83b0a29f1fdd2ccccca19a9bab805a925b8eddf432a5a3d3da04afbc", DiffID: "sha256:39982b2a789afc156fff00c707d0ff1c6ab4af8f1666a8df4787714059ce24e7", }, - Locations: []ftypes.Location{ - { - StartLine: 10, - EndLine: 12, - }, - }, Digest: "SHA1:901a7b55410321c4d35543506cff2a8613ef5aa2", Indirect: true, }, @@ -90,14 +84,6 @@ func TestConvertToRpcPkgs(t *testing.T) { Digest: "sha256:6a428f9f83b0a29f1fdd2ccccca19a9bab805a925b8eddf432a5a3d3da04afbc", DiffId: "sha256:39982b2a789afc156fff00c707d0ff1c6ab4af8f1666a8df4787714059ce24e7", }, - Locations: &common.Locations{ - Location: []*common.Location{ - { - StartLine: 10, - EndLine: 12, - }, - }, - }, Digest: "SHA1:901a7b55410321c4d35543506cff2a8613ef5aa2", Indirect: true, }, @@ -149,14 +135,6 @@ func TestConvertFromRpcPkgs(t *testing.T) { Digest: "sha256:6a428f9f83b0a29f1fdd2ccccca19a9bab805a925b8eddf432a5a3d3da04afbc", DiffId: "sha256:39982b2a789afc156fff00c707d0ff1c6ab4af8f1666a8df4787714059ce24e7", }, - Locations: &common.Locations{ - Location: []*common.Location{ - { - StartLine: 10, - EndLine: 12, - }, - }, - }, Digest: "SHA1:901a7b55410321c4d35543506cff2a8613ef5aa2", Indirect: true, }, @@ -190,12 +168,6 @@ func TestConvertFromRpcPkgs(t *testing.T) { }, Digest: "SHA1:901a7b55410321c4d35543506cff2a8613ef5aa2", Indirect: true, - Locations: []ftypes.Location{ - { - StartLine: 10, - EndLine: 12, - }, - }, }, }, }, @@ -291,12 +263,10 @@ func TestConvertToRpcVulns(t *testing.T) { Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", }, - Locations: &common.Locations{ - Location: []*common.Location{ - { - StartLine: 15, - EndLine: 20, - }, + Locations: []*common.Location{ + { + StartLine: 15, + EndLine: 20, }, }, PrimaryUrl: "https://avd.aquasec.com/nvd/CVE-2019-0001", @@ -357,12 +327,10 @@ func TestConvertToRpcVulns(t *testing.T) { Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", }, - Locations: &common.Locations{ - Location: []*common.Location{ - { - StartLine: 15, - EndLine: 20, - }, + Locations: []*common.Location{ + { + StartLine: 15, + EndLine: 20, }, }, DataSource: &common.DataSource{ @@ -430,12 +398,10 @@ func TestConvertFromRPCResults(t *testing.T) { Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", }, - Locations: &common.Locations{ - Location: []*common.Location{ - { - StartLine: 15, - EndLine: 20, - }, + Locations: []*common.Location{ + { + StartLine: 15, + EndLine: 20, }, }, PrimaryUrl: "https://avd.aquasec.com/nvd/CVE-2019-0001",