Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Mar 14, 2024
1 parent 1db9931 commit 76e4023
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/build/recorder_test.go
Expand Up @@ -101,7 +101,7 @@ func TestBuildRecording(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
inner := &fake{
b: func(ip string) (Result, error) {
b: func(_ string) (Result, error) {
return nil, nil
},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/resolve.go
Expand Up @@ -54,7 +54,7 @@ func addResolve(topLevel *cobra.Command) {
# This always preserves import paths.
ko resolve --local -f config/`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
if err := options.Validate(po, bo); err != nil {
return fmt.Errorf("validating options: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/root.go
Expand Up @@ -32,7 +32,7 @@ func New() *cobra.Command {
Short: "Rapidly iterate with Go, Containers, and Kubernetes.",
SilenceUsage: true, // Don't show usage on errors
DisableAutoGenTag: true,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
PersistentPreRun: func(_ *cobra.Command, _ []string) {
if verbose {
logs.Warn.SetOutput(os.Stderr)
logs.Debug.SetOutput(os.Stderr)
Expand All @@ -41,7 +41,7 @@ func New() *cobra.Command {

maxprocs.Set(maxprocs.Logger(logs.Debug.Printf))
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
cmd.Help()
},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/version.go
Expand Up @@ -29,7 +29,7 @@ func addVersion(topLevel *cobra.Command) {
topLevel.AddCommand(&cobra.Command{
Use: "version",
Short: `Print ko version.`,
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
v := version()
if v == "" {
fmt.Println("could not determine build information")
Expand Down
2 changes: 1 addition & 1 deletion pkg/publish/recorder.go
Expand Up @@ -55,7 +55,7 @@ func (r *recorder) Publish(ctx context.Context, br build.Result, ref string) (na
references := make([]string, 0, 20 /* just try to avoid resizing*/)
switch t := br.(type) {
case oci.SignedImageIndex:
if err := walk.SignedEntity(ctx, t, func(ctx context.Context, se oci.SignedEntity) error {
if err := walk.SignedEntity(ctx, t, func(_ context.Context, se oci.SignedEntity) error {
// Both of the SignedEntity types implement Digest()
h, err := se.(interface{ Digest() (v1.Hash, error) }).Digest()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/publish/recorder_test.go
Expand Up @@ -42,7 +42,7 @@ func (sp *cbPublish) Close() error {

func TestRecorder(t *testing.T) {
repo := name.MustParseReference("docker.io/ubuntu:latest")
inner := &cbPublish{cb: func(c context.Context, b build.Result, s string) (name.Reference, error) {
inner := &cbPublish{cb: func(_ context.Context, b build.Result, _ string) (name.Reference, error) {
h, err := b.Digest()
if err != nil {
return nil, err
Expand Down

0 comments on commit 76e4023

Please sign in to comment.