diff --git a/src/cmd/run.go b/src/cmd/run.go index 1bf069f1b..430f20266 100644 --- a/src/cmd/run.go +++ b/src/cmd/run.go @@ -25,7 +25,7 @@ var runCmd = &cobra.Command{ Use: "run [ TASK NAME ]", Short: "run a task", Long: `run a task from an tasks file`, - ValidArgsFunction: func(_ *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective) { + ValidArgsFunction: func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) { var tasksFile types.TasksFile if _, err := os.Stat(config.TaskFileLocation); os.IsNotExist(err) { diff --git a/src/cmd/uds.go b/src/cmd/uds.go index 6d30ef881..e6630f08f 100644 --- a/src/cmd/uds.go +++ b/src/cmd/uds.go @@ -119,7 +119,7 @@ var removeCmd = &cobra.Command{ Aliases: []string{"r"}, Args: cobra.ExactArgs(1), Short: lang.CmdBundleRemoveShort, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { bundleCfg.RemoveOpts.Source = args[0] configureZarf() @@ -138,12 +138,12 @@ var publishCmd = &cobra.Command{ Aliases: []string{"p"}, Short: lang.CmdPublishShort, Args: cobra.ExactArgs(2), - PreRun: func(cmd *cobra.Command, args []string) { + PreRun: func(_ *cobra.Command, args []string) { if _, err := os.Stat(args[0]); err != nil { message.Fatalf(err, "First argument (%q) must be a valid local Bundle path: %s", args[0], err.Error()) } }, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { bundleCfg.PublishOpts.Source = args[0] bundleCfg.PublishOpts.Destination = args[1] configureZarf() @@ -162,7 +162,7 @@ var pullCmd = &cobra.Command{ Aliases: []string{"p"}, Short: lang.CmdBundlePullShort, Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { bundleCfg.PullOpts.Source = args[0] configureZarf() bndlClient := bundle.NewOrDie(&bundleCfg) diff --git a/src/pkg/bundler/remotebundle.go b/src/pkg/bundler/remotebundle.go index f18debeeb..4df60590d 100644 --- a/src/pkg/bundler/remotebundle.go +++ b/src/pkg/bundler/remotebundle.go @@ -74,8 +74,8 @@ func (r *RemoteBundle) create(signature []byte) error { for i, pkg := range bundle.Packages { // todo: can leave this block here or move to pusher.NewPkgPusher (would be closer to NewPkgFetcher pattern) - pkgUrl := fmt.Sprintf("%s:%s", pkg.Repository, pkg.Ref) - src, err := oci.NewOrasRemote(pkgUrl, platform) + pkgURL := fmt.Sprintf("%s:%s", pkg.Repository, pkg.Ref) + src, err := oci.NewOrasRemote(pkgURL, platform) if err != nil { return err } diff --git a/src/pkg/utils/sbom.go b/src/pkg/utils/sbom.go index 6c4555cea..0239dce9b 100644 --- a/src/pkg/utils/sbom.go +++ b/src/pkg/utils/sbom.go @@ -45,7 +45,7 @@ func MoveExtractedSBOMs(src, dst string) error { // SBOMExtractor is the extraction fn for extracting HTML and JSON files from an sboms.tar archive func SBOMExtractor(dst string, SBOMArtifactPathMap map[string]string) func(_ context.Context, f archiver.File) error { - extractor := func(ctx context.Context, f archiver.File) error { + extractor := func(_ context.Context, f archiver.File) error { open, err := f.Open() if err != nil { return err