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/checkout@v4
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: '1.22' go-version: '1.23'
cache: false cache: false
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v3
@ -26,7 +26,7 @@ jobs:
# Require: The version of golangci-lint to use. # 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 `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. # 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 # Optional: working directory, useful for monorepos
# working-directory: somedir # working-directory: somedir

View File

@ -14,7 +14,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '1.22.x' go-version: '1.23.x'
- name: Install dependencies - name: Install dependencies
run: go mod download run: go mod download
- name: Test with the Go CLI - name: Test with the Go CLI

View File

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

View File

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

2
go.mod
View File

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

View File

@ -21,7 +21,7 @@ func Wrap(err error, msg string) error {
chunks := strings.Split(frame.Function, "/") chunks := strings.Split(frame.Function, "/")
withCaller := fmt.Sprintf("%s: %s", chunks[len(chunks)-1], msg) withCaller := fmt.Sprintf("%s: %s", chunks[len(chunks)-1], msg)
if err == nil { if err == nil {
return fmt.Errorf(withCaller) return errors.New(withCaller)
} }
return fmt.Errorf("%s: %w", withCaller, err) return fmt.Errorf("%s: %w", withCaller, err)
} }