Update to use Go 1.23 (#462)

* 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] <support@github.com>

* Use Go 1.23 throughout

* Update golangci-lint

* Fix complaint raised by linter

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frederik Ring <frederik.ring@gmail.com>
This commit is contained in:
dependabot[bot] 2024-08-20 11:17:49 +02:00 committed by GitHub
parent 8fac9608ff
commit c54a5bef5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 7 deletions

View File

@ -18,7 +18,7 @@ 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
@ -26,7 +26,7 @@ jobs:
# 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

View File

@ -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

View File

@ -5,4 +5,5 @@ linters:
- staticcheck
- govet
output:
format: github-actions
formats:
- format: colored-line-number

View File

@ -1,7 +1,7 @@
# Copyright 2022 - offen.software <hioffen@posteo.de>
# SPDX-License-Identifier: MPL-2.0
FROM golang:1.22-alpine as builder
FROM golang:1.23-alpine as builder
WORKDIR /app
COPY . .

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/offen/docker-volume-backup
go 1.22
go 1.23
require (
filippo.io/age v1.2.0

View File

@ -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)
}