Skip to content

Commit

Permalink
Make apk and cos extractor names public constants.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 631401859
  • Loading branch information
Yousef Alowayed authored and copybara-github committed May 7, 2024
1 parent 64da34d commit 3053252
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion extractor/os/apk/extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ import (
"github.com/google/osv-scalibr/purl"
)

const (
// Name is the unique name of this extractor.
Name = "os/apk"
)

// Extractor extracts packages from the APK database.
type Extractor struct{}

// Name of the extractor.
func (e Extractor) Name() string { return "os/apk" }
func (e Extractor) Name() string { return Name }

// Version of the extractor.
func (e Extractor) Version() int { return 0 }
Expand Down
7 changes: 6 additions & 1 deletion extractor/os/cos/extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ import (
"github.com/google/osv-scalibr/purl"
)

const (
// Name is the unique name of this extractor.
Name = "os/cos"
)

// Extractor extracts cos packages from cos database.
type Extractor struct{}

Expand All @@ -45,7 +50,7 @@ type cosPackageInfo struct {
}

// Name of the extractor.
func (e Extractor) Name() string { return "os/cos" }
func (e Extractor) Name() string { return Name }

// Version of the extractor.
func (e Extractor) Version() int { return 0 }
Expand Down

0 comments on commit 3053252

Please sign in to comment.