Skip to content

Commit e6348bf

Browse files
chore(deps): bump golangci/golangci-lint-action from 6.1.1 to 8.0.0 (#201)
* chore(deps): bump golangci/golangci-lint-action from 6.1.1 to 8.0.0 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.1 to 8.0.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@971e284...4afd733) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: remove default version * chore: run golangci-lint v2.4.0 * chore: avoid inline error handling using `if err := ...; err != nil` * chore: use listen config --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
1 parent 37b83e5 commit e6348bf

File tree

6 files changed

+118
-22
lines changed

6 files changed

+118
-22
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- uses: actions/setup-go@v5
2020
- name: golangci-lint
21-
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
22-
with:
23-
version: v2.0.2
21+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0

config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ func (c config) LogAttrs() []slog.Attr {
6363
// applying defaults where necessary.
6464
func loadConfig() (*config, error) {
6565
var cfg config
66-
if err := env.Parse(&cfg); err != nil {
66+
67+
err := env.Parse(&cfg)
68+
if err != nil {
6769
return nil, fmt.Errorf("parse env: %w", err)
6870
}
6971

config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ func clearConfigEnv(t *testing.T) {
1414
t.Helper()
1515

1616
var cfg config
17+
1718
typ := reflect.TypeOf(cfg)
1819
for i := range typ.NumField() {
1920
field := typ.Field(i)
@@ -85,6 +86,7 @@ func Test_loadConfig(t *testing.T) {
8586
} {
8687
t.Run("invalid-"+name, func(t *testing.T) {
8788
t.Setenv(name, "invalid")
89+
8890
_, err := loadConfig()
8991
require.Error(t, err)
9092
})

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ func run() error {
2020
return fmt.Errorf("new reaper: %w", err)
2121
}
2222

23-
if err = r.run(ctx); err != nil {
23+
err = r.run(ctx)
24+
if err != nil {
2425
return fmt.Errorf("run: %w", err)
2526
}
2627

2728
return nil
2829
}
2930

3031
func main() {
31-
if err := run(); err != nil {
32+
err := run()
33+
if err != nil {
3234
slog.Error("run", fieldError, err)
3335
os.Exit(1)
3436
}

0 commit comments

Comments
 (0)