Skip to content

Commit

Permalink
Merge pull request #352 from tri-adam/fix-lint
Browse files Browse the repository at this point in the history
fix: remove unused params in function literals
  • Loading branch information
tri-adam committed Feb 9, 2024
2 parents 4960f05 + 418fb7a commit 7cf41e5
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions cmd/siftool/siftool.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2022, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
Expand Down Expand Up @@ -57,7 +57,7 @@ func getVersion() *cobra.Command {
Short: "Display version information",
Long: "Display binary version, build info and compatible SIF version(s).",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return writeVersion(cmd.OutOrStdout())
},
DisableFlagsInUseLine: true,
Expand Down
4 changes: 2 additions & 2 deletions pkg/integrity/verify_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2024, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
// distributed with the sources of this project regarding your rights to use or distribute this
// software.
Expand Down Expand Up @@ -459,7 +459,7 @@ func TestNewVerifier(t *testing.T) { //nolint:maintidx

kr := openpgp.EntityList{getTestEntity(t)}

cb := func(r VerifyResult) bool { return false }
cb := func(_ VerifyResult) bool { return false }

tests := []struct {
name string
Expand Down
4 changes: 2 additions & 2 deletions pkg/sif/descriptor_input.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021-2023, Sylabs Inc. All rights reserved.
// Copyright (c) 2021-2024, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
Expand Down Expand Up @@ -95,7 +95,7 @@ func OptObjectTime(t time.Time) DescriptorInputOpt {

// OptMetadata marshals metadata from md into the "extra" field of d.
func OptMetadata(md encoding.BinaryMarshaler) DescriptorInputOpt {
return func(t DataType, opts *descriptorOpts) error {
return func(_ DataType, opts *descriptorOpts) error {
opts.md = md
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/siftool/del.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
Expand All @@ -23,7 +23,7 @@ func (c *command) getDel() *cobra.Command {
Example: c.opts.rootPath + " del 1 image.sif",
Args: cobra.ExactArgs(2),
PreRunE: c.initApp,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
id, err := strconv.ParseUint(args[0], 10, 32)
if err != nil {
return fmt.Errorf("while converting id: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/siftool/dump.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2018, Divya Cote <divya.cote@gmail.com> All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
Expand All @@ -24,7 +24,7 @@ func (c *command) getDump() *cobra.Command {
Example: c.opts.rootPath + " dump 1 image.sif",
Args: cobra.ExactArgs(2),
PreRunE: c.initApp,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
id, err := strconv.ParseUint(args[0], 10, 32)
if err != nil {
return fmt.Errorf("while converting id: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/siftool/header.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2018, Divya Cote <divya.cote@gmail.com> All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
Expand All @@ -21,7 +21,7 @@ func (c *command) getHeader() *cobra.Command {
Example: c.opts.rootPath + " header image.sif",
Args: cobra.ExactArgs(1),
PreRunE: c.initApp,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
return c.app.Header(args[0])
},
DisableFlagsInUseLine: true,
Expand Down
4 changes: 2 additions & 2 deletions pkg/siftool/info.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2018, Divya Cote <divya.cote@gmail.com> All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
Expand All @@ -25,7 +25,7 @@ func (c *command) getInfo() *cobra.Command {
Example: c.opts.rootPath + " info 1 image.sif",
Args: cobra.ExactArgs(2),
PreRunE: c.initApp,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
id, err := strconv.ParseUint(args[0], 10, 32)
if err != nil {
return fmt.Errorf("while converting id: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/siftool/list.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2018, Divya Cote <divya.cote@gmail.com> All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
Expand All @@ -21,7 +21,7 @@ func (c *command) getList() *cobra.Command {
Example: c.opts.rootPath + " list image.sif",
Args: cobra.ExactArgs(1),
PreRunE: c.initApp,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
return c.app.List(args[0])
},
DisableFlagsInUseLine: true,
Expand Down
4 changes: 2 additions & 2 deletions pkg/siftool/new.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
Expand All @@ -20,7 +20,7 @@ func (c *command) getNew() *cobra.Command {
Example: c.opts.rootPath + " new image.sif",
Args: cobra.ExactArgs(1),
PreRunE: c.initApp,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
return c.app.New(args[0])
},
DisableFlagsInUseLine: true,
Expand Down
4 changes: 2 additions & 2 deletions pkg/siftool/setprim.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
Expand All @@ -23,7 +23,7 @@ func (c *command) getSetPrim() *cobra.Command {
Example: c.opts.rootPath + " setprim 1 image.sif",
Args: cobra.ExactArgs(2),
PreRunE: c.initApp,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
id, err := strconv.ParseUint(args[0], 10, 32)
if err != nil {
return fmt.Errorf("while converting id: %w", err)
Expand Down

0 comments on commit 7cf41e5

Please sign in to comment.