Skip to content

Commit

Permalink
more gh lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGedd committed Feb 21, 2024
1 parent f12138b commit d8a3290
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions src/cmd/uds.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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()
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/pkg/bundler/remotebundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/utils/sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8a3290

Please sign in to comment.