Skip to content

Commit d383f94

Browse files
authored
Merge pull request #118 from vdice/chore/bump-golangci-lint
chore(.github): bump golangci-lint-action to v8, version to v2.5.0, address lint errs
2 parents 7202246 + 1f508e7 commit d383f94

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
go-version: stable
2424
cache: false
2525
- name: golangci-lint
26-
uses: golangci/golangci-lint-action@v6
26+
uses: golangci/golangci-lint-action@v8
2727
with:
28-
version: v1.64.6
28+
version: v2.5.0
2929
args: --timeout 3m

pkg/cmd/get.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ var getCmd = &cobra.Command{
3232
return err
3333
}
3434

35-
printApps(os.Stdout, app)
36-
return nil
35+
return printApps(os.Stdout, app)
3736
},
3837
}
3938

pkg/cmd/list.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ var listCmd = &cobra.Command{
1717
return err
1818
}
1919

20-
printApps(os.Stdout, appsResp.Items...)
21-
22-
return nil
20+
return printApps(os.Stdout, appsResp.Items...)
2321
},
2422
}
2523

pkg/cmd/output.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
spinv1alpha1 "github.com/spinkube/spin-operator/api/v1alpha1"
99
)
1010

11-
func printApps(w io.Writer, apps ...spinv1alpha1.SpinApp) {
11+
func printApps(w io.Writer, apps ...spinv1alpha1.SpinApp) error {
1212
table := uitable.New()
1313
table.MaxColWidth = 50
1414
table.AddRow("NAMESPACE", "NAME", "EXECUTOR", "READY")
@@ -17,5 +17,6 @@ func printApps(w io.Writer, apps ...spinv1alpha1.SpinApp) {
1717
table.AddRow(app.Namespace, app.Name, app.Spec.Executor, fmt.Sprintf("%d/%d", app.Status.ReadyReplicas, app.Spec.Replicas))
1818
}
1919

20-
fmt.Fprintln(w, table)
20+
_, err := fmt.Fprintln(w, table)
21+
return err
2122
}

pkg/cmd/scaffold.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ var scaffoldCmd = &cobra.Command{
198198

199199
}
200200

201-
fmt.Fprint(os.Stdout, string(content))
201+
_, err = fmt.Fprint(os.Stdout, string(content))
202202

203-
return nil
203+
return err
204204
},
205205
}
206206

0 commit comments

Comments
 (0)