chore(k8s): update comments with deprecated command format (#8964)

This commit is contained in:
afdesk
2025-06-03 12:54:45 +06:00
committed by GitHub
parent 14d2b83d4b
commit 521be3a178

View File

@@ -133,16 +133,11 @@ func (r *runner) run(ctx context.Context, artifacts []*k8sArtifacts.Artifact) er
// even though the default value of "--report" is "all".
//
// e.g.
// $ trivy k8s --report all cluster
// $ trivy k8s --report all all
// $ trivy k8s --report all
//
// Or they can use "--format json" with implicit "--report all".
//
// e.g. $ trivy k8s --format json cluster // All the results are shown in JSON
//
// Single resource scanning is allowed with implicit "--report all".
//
// e.g. $ trivy k8s pod myapp
// e.g. $ trivy k8s --format json // All the results are shown in JSON
func validateReportArguments(opts flag.Options) error {
if opts.ReportFormat == "all" &&
!viper.IsSet("report") &&