Skip to content

Commit

Permalink
Update to use Go 1.23 (#462)
Browse files Browse the repository at this point in the history
* Bump golang from 1.22-alpine to 1.23-alpine

Bumps golang from 1.22-alpine to 1.23-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Use Go 1.23 throughout

* Update golangci-lint

* Fix complaint raised by linter

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frederik Ring <[email protected]>
  • Loading branch information
dependabot[bot] and m90 authored Aug 20, 2024
1 parent 8fac960 commit c54a5be
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.57
version: v1.60

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'
go-version: '1.23.x'
- name: Install dependencies
run: go mod download
- name: Test with the Go CLI
Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ linters:
- staticcheck
- govet
output:
format: github-actions
formats:
- format: colored-line-number
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2022 - offen.software <[email protected]>
# SPDX-License-Identifier: MPL-2.0

FROM golang:1.22-alpine as builder
FROM golang:1.23-alpine as builder

WORKDIR /app
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/offen/docker-volume-backup

go 1.22
go 1.23

require (
filippo.io/age v1.2.0
Expand Down
2 changes: 1 addition & 1 deletion internal/errwrap/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Wrap(err error, msg string) error {
chunks := strings.Split(frame.Function, "/")
withCaller := fmt.Sprintf("%s: %s", chunks[len(chunks)-1], msg)
if err == nil {
return fmt.Errorf(withCaller)
return errors.New(withCaller)
}
return fmt.Errorf("%s: %w", withCaller, err)
}
Expand Down

0 comments on commit c54a5be

Please sign in to comment.