mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 15:37:50 -08:00
feat: add k8s subcommand (#2065)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
17
pkg/commands/option/kubernetes.go
Normal file
17
pkg/commands/option/kubernetes.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package option
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// KubernetesOption holds the options for Kubernetes scanning
|
||||
type KubernetesOption struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
// NewKubernetesOption is the factory method to return Kubernetes options
|
||||
func NewKubernetesOption(c *cli.Context) KubernetesOption {
|
||||
return KubernetesOption{
|
||||
Namespace: c.String("namespace"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user