Skip to content

Commit

Permalink
feat(cli)!: delete deprecated SBOM flags (#7266)
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 authored Jul 31, 2024
1 parent 45b3f34 commit 7024572
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 62 deletions.
1 change: 0 additions & 1 deletion pkg/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,6 @@ func NewSBOMCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
RemoteFlagGroup: flag.NewClientFlags(), // for client/server mode
ReportFlagGroup: reportFlagGroup,
ScanFlagGroup: scanFlagGroup,
SBOMFlagGroup: flag.NewSBOMFlagGroup(),
VulnerabilityFlagGroup: flag.NewVulnerabilityFlagGroup(),
LicenseFlagGroup: licenseFlagGroup,
}
Expand Down
12 changes: 0 additions & 12 deletions pkg/flag/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ type Flags struct {
RegoFlagGroup *RegoFlagGroup
RepoFlagGroup *RepoFlagGroup
ReportFlagGroup *ReportFlagGroup
SBOMFlagGroup *SBOMFlagGroup
ScanFlagGroup *ScanFlagGroup
SecretFlagGroup *SecretFlagGroup
VulnerabilityFlagGroup *VulnerabilityFlagGroup
Expand All @@ -350,7 +349,6 @@ type Options struct {
RemoteOptions
RepoOptions
ReportOptions
SBOMOptions
ScanOptions
SecretOptions
VulnerabilityOptions
Expand Down Expand Up @@ -549,9 +547,6 @@ func (f *Flags) groups() []FlagGroup {
if f.ImageFlagGroup != nil {
groups = append(groups, f.ImageFlagGroup)
}
if f.SBOMFlagGroup != nil {
groups = append(groups, f.SBOMFlagGroup)
}
if f.VulnerabilityFlagGroup != nil {
groups = append(groups, f.VulnerabilityFlagGroup)
}
Expand Down Expand Up @@ -760,13 +755,6 @@ func (f *Flags) ToOptions(args []string) (Options, error) {
}
}

if f.SBOMFlagGroup != nil {
opts.SBOMOptions, err = f.SBOMFlagGroup.ToOptions()
if err != nil {
return Options{}, xerrors.Errorf("sbom flag error: %w", err)
}
}

if f.ScanFlagGroup != nil {
opts.ScanOptions, err = f.ScanFlagGroup.ToOptions(args)
if err != nil {
Expand Down
49 changes: 0 additions & 49 deletions pkg/flag/sbom_flags.go

This file was deleted.

0 comments on commit 7024572

Please sign in to comment.