mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
20 lines
407 B
Go
20 lines
407 B
Go
package option
|
|
|
|
import (
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// ImageOption holds the options for scanning images
|
|
type ImageOption struct {
|
|
ScanRemovedPkgs bool
|
|
ListAllPkgs bool
|
|
}
|
|
|
|
// NewImageOption is the factory method to return ImageOption
|
|
func NewImageOption(c *cli.Context) ImageOption {
|
|
return ImageOption{
|
|
ScanRemovedPkgs: c.Bool("removed-pkgs"),
|
|
ListAllPkgs: c.Bool("list-all-pkgs"),
|
|
}
|
|
}
|