mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
* refactor: export internal packages * refactor(server): define Server * refactor: fix lint issues * test(integration): fix imports
20 lines
406 B
Go
20 lines
406 B
Go
package config
|
|
|
|
import (
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// ImageConfig holds the config for scanning images
|
|
type ImageConfig struct {
|
|
ScanRemovedPkgs bool
|
|
ListAllPkgs bool
|
|
}
|
|
|
|
// NewImageConfig is the factory method to return imageConfig
|
|
func NewImageConfig(c *cli.Context) ImageConfig {
|
|
return ImageConfig{
|
|
ScanRemovedPkgs: c.Bool("removed-pkgs"),
|
|
ListAllPkgs: c.Bool("list-all-pkgs"),
|
|
}
|
|
}
|