mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-21 06:43:05 -08:00
22 lines
504 B
Go
22 lines
504 B
Go
package option
|
|
|
|
import (
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// KubernetesOption holds the options for Kubernetes scanning
|
|
type KubernetesOption struct {
|
|
ClusterContext string
|
|
Namespace string
|
|
ReportFormat string
|
|
}
|
|
|
|
// NewKubernetesOption is the factory method to return Kubernetes options
|
|
func NewKubernetesOption(c *cli.Context) KubernetesOption {
|
|
return KubernetesOption{
|
|
ClusterContext: c.String("context"),
|
|
Namespace: c.String("namespace"),
|
|
ReportFormat: c.String("report"),
|
|
}
|
|
}
|