mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
Unexport types and functions cataloger packages (#2530)
* unexport as many types and functions from cataloger packages as possible Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * capture type and signature information in convention test Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * check that we return pkg.Cataloger from constructors Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
const gradleLockfileGlob = "**/gradle.lockfile*"
|
||||
|
||||
// LockfileDependency represents a single dependency in the gradle.lockfile file
|
||||
type LockfileDependency struct {
|
||||
// lockfileDependency represents a single dependency in the gradle.lockfile file
|
||||
type lockfileDependency struct {
|
||||
Group string
|
||||
Name string
|
||||
Version string
|
||||
@@ -27,7 +27,7 @@ func parseGradleLockfile(_ context.Context, _ file.Resolver, _ *generic.Environm
|
||||
scanner := bufio.NewScanner(reader)
|
||||
|
||||
// Create slices to hold the dependencies and plugins
|
||||
dependencies := []LockfileDependency{}
|
||||
dependencies := []lockfileDependency{}
|
||||
|
||||
// Loop over all lines in the file
|
||||
for scanner.Scan() {
|
||||
@@ -43,7 +43,7 @@ func parseGradleLockfile(_ context.Context, _ file.Resolver, _ *generic.Environm
|
||||
// we have a version directly specified
|
||||
if len(parts) == 3 {
|
||||
// Create a new Dependency struct and add it to the dependencies slice
|
||||
dep := LockfileDependency{Group: parts[0], Name: parts[1], Version: parts[2]}
|
||||
dep := lockfileDependency{Group: parts[0], Name: parts[1], Version: parts[2]}
|
||||
dependencies = append(dependencies, dep)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user