Files
trivy/pkg/commands/option/kubernetes.go
Jose Donizetti e18f38af3c feat(k8s): add --context flag (#2171)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
2022-05-31 07:06:10 -03:00

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"),
}
}