Skip to content

Commit

Permalink
chore: slice loop replace (#1738)
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill authored Mar 7, 2024
1 parent 5c79235 commit 9701ea0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions grype/pkg/upstream_package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ func TestUpstreamPackages(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
var actual []Package
for _, upstream := range UpstreamPackages(tt.pkg) {
actual = append(actual, upstream)
}
actual = append(actual, UpstreamPackages(tt.pkg)...)
assert.Equalf(t, tt.expected, actual, "UpstreamPackages(%v)", tt.pkg)
})
}
Expand Down

0 comments on commit 9701ea0

Please sign in to comment.