mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +01:00
remove variadic functionality from intRef() test helper
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -91,7 +91,7 @@ func TestPackageURL(t *testing.T) {
|
||||
Metadata: pkg.RpmdbMetadata{
|
||||
Name: "name",
|
||||
Version: "0.1.0",
|
||||
Epoch: intRef(),
|
||||
Epoch: nil,
|
||||
Arch: "amd64",
|
||||
Release: "3",
|
||||
},
|
||||
@@ -131,9 +131,6 @@ func TestPackageURL(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func intRef(i ...int) *int {
|
||||
if len(i) == 0 {
|
||||
return nil
|
||||
}
|
||||
return &i[0]
|
||||
func intRef(i int) *int {
|
||||
return &i
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func TestParseRpmDB(t *testing.T) {
|
||||
MetadataType: pkg.RpmdbMetadataType,
|
||||
Metadata: pkg.RpmdbMetadata{
|
||||
Name: "dive",
|
||||
Epoch: intRef(),
|
||||
Epoch: nil,
|
||||
Arch: "x86_64",
|
||||
Release: "1",
|
||||
Version: "0.9.2",
|
||||
@@ -99,7 +99,7 @@ func TestParseRpmDB(t *testing.T) {
|
||||
MetadataType: pkg.RpmdbMetadataType,
|
||||
Metadata: pkg.RpmdbMetadata{
|
||||
Name: "dive",
|
||||
Epoch: intRef(),
|
||||
Epoch: nil,
|
||||
Arch: "x86_64",
|
||||
Release: "1",
|
||||
Version: "0.9.2",
|
||||
@@ -204,9 +204,6 @@ func TestToElVersion(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func intRef(i ...int) *int {
|
||||
if len(i) == 0 {
|
||||
return nil
|
||||
}
|
||||
return &i[0]
|
||||
func intRef(i int) *int {
|
||||
return &i
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user