Skip to content

Commit 49e7b60

Browse files
use last go, golang-ci & alpine version
to avoid this error during lint: ``` # golang.org/x/tools/go/ast/astutil Error: ../../../go/pkg/mod/golang.org/x/[email protected]/go/ast/astutil/enclosing.go:323:23: n.Type.TypeParams undefined (type *ast.FuncType has no field or method TypeParams) Error: ../../../go/pkg/mod/golang.org/x/[email protected]/go/ast/astutil/enclosing.go:378:8: undefined: ast.IndexListExpr Error: ../../../go/pkg/mod/golang.org/x/[email protected]/go/ast/astutil/enclosing.go:589:8: undefined: ast.IndexListExpr Error: ../../../go/pkg/mod/golang.org/x/[email protected]/go/ast/astutil/rewrite.go:253:8: undefined: ast.IndexListExpr Error: ../../../go/pkg/mod/golang.org/x/[email protected]/go/ast/astutil/rewrite.go:294:18: n.TypeParams undefined (type *ast.FuncType has no field or method TypeParams) Error: ../../../go/pkg/mod/golang.org/x/[email protected]/go/ast/astutil/rewrite.go:409:18: n.TypeParams undefined (type *ast.TypeSpec has no field or method TypeParams) note: module requires Go 1.19 ``` remove deprecated flag `-i` with `go build`: ``` flag provided but not defined: -i ```
1 parent c023298 commit 49e7b60

File tree

6 files changed

+13
-323
lines changed

6 files changed

+13
-323
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
name: lint
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Set up Go 1.17
16+
- name: Set up Go
1717
uses: actions/setup-go@v2
1818
with:
19-
go-version: 1.17
19+
go-version: '1.22'
2020
id: go
2121

2222
- name: Check out code into the Go module directory
@@ -26,17 +26,16 @@ jobs:
2626
run: make fmtcheck
2727

2828
- name: Linter
29-
uses: golangci/golangci-lint-action@v3
30-
with:
31-
version: v1.46
29+
uses: golangci/golangci-lint-action@v6
30+
3231
build:
3332
name: test
3433
runs-on: ubuntu-latest
3534
steps:
36-
- name: Set up Go 1.17
35+
- name: Set up Go
3736
uses: actions/setup-go@v2
3837
with:
39-
go-version: 1.17
38+
go-version: '1.22'
4039
id: go
4140

4241
- name: Check out code into the Go module directory

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Set up Go
3939
uses: actions/setup-go@v3
4040
with:
41-
go-version: 1.17
41+
go-version: '1.22'
4242
id: go
4343

4444
- name: Build

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17-alpine as app-builder
1+
FROM golang:1.22-alpine as app-builder
22

33
ENV SRC_DIR /s3proxy
44
WORKDIR $SRC_DIR
@@ -14,15 +14,15 @@ COPY . ./
1414
RUN apk add build-base curl && make
1515

1616

17-
FROM golang:1.17-alpine as lib-builder
17+
FROM golang:1.22-alpine as lib-builder
1818

1919
WORKDIR /root
2020
RUN apk add git
2121
RUN git clone https://github.com/mirakl/dns-aaaa-no-more.git
2222
RUN apk add build-base && cd dns-aaaa-no-more && make
2323

2424

25-
FROM alpine:3.15
25+
FROM alpine:3.20
2626

2727
# Magic !
2828
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ GOFILES = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
1111
default: build
1212

1313
build: clean
14-
go build -i -v ${LDFLAGS} -o ${NAME}
14+
go build -v ${LDFLAGS} -o ${NAME}
1515

1616
clean:
1717
if [ -f "${NAME}" ] ; then rm ${NAME} ; fi
1818

1919
lint:
20-
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.46.2 golangci-lint run -v
20+
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.59.1 golangci-lint run -v
2121

2222
fmtcheck: tools.goimports
2323
@echo "--> checking code formatting with 'goimports' tool"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/mirakl/s3proxy
22

3-
go 1.17
3+
go 1.22
44

55
require (
66
github.com/aws/aws-sdk-go v1.42.53

0 commit comments

Comments
 (0)