From 6dc53671ab86e16928ececcebe8c60402aebfe68 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 22 Aug 2023 21:48:19 -0400 Subject: [PATCH] fix: Add bom generate subcommand There was already a main for this, so we just have to add an entry in the subcommand. Also, sort those subcommand entries for good measure, and drop a now-unneeded 'nolint'. Signed-off-by: Scott Moser --- cmd/stacker/bom.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/stacker/bom.go b/cmd/stacker/bom.go index ef37ecd2..a138d1ab 100644 --- a/cmd/stacker/bom.go +++ b/cmd/stacker/bom.go @@ -16,13 +16,17 @@ var bomCmd = cli.Command{ Name: "bom", Usage: "work with a software bill of materials (BOM)", Subcommands: []*cli.Command{ + &cli.Command{ + Name: "build", + Action: doBomBuild, + }, &cli.Command{ Name: "discover", Action: doBomDiscover, }, &cli.Command{ - Name: "build", - Action: doBomBuild, + Name: "generate", + Action: doBomGenerate, }, &cli.Command{ Name: "verify", @@ -42,7 +46,7 @@ func doBomDiscover(ctx *cli.Context) error { return nil } -func doBomGenerate(ctx *cli.Context) error { //nolint:unused // used when invoked inside "run:" +func doBomGenerate(ctx *cli.Context) error { if ctx.Args().Len() != 1 { return errors.Errorf("wrong number of args for umount") }