Skip to content

Commit

Permalink
build: Upgrade to go-1.23, Linter1.61.0 and Alpine 3.20
Browse files Browse the repository at this point in the history
Upgrade to go-1.23, Linter1.61.0 and Alpine 3.20

Signed-off-by: bruce <weichou1229@gmail.com>
  • Loading branch information
weichou1229 committed Oct 8, 2024
1 parent 72f694e commit 5b9efd6
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 152 deletions.
9 changes: 8 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
linters:
disable:
enable:
- gosec
- gosec

linters-settings:
gosec:
excludes:
# G115: integer overflow conversion
# exclude the rule since it tends to be false positive
- G115
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lint:
@if [ "z${ARCH}" = "zx86_64" ] && which golangci-lint >/dev/null ; then golangci-lint run --config .golangci.yml ; else echo "WARNING: Linting skipped (not on x86_64 or linter not installed)"; fi

install-lint:
sudo curl -sSfL https://github.com/raw/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.54.2
sudo curl -sSfL https://github.com/raw/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.61.0

tidy:
go mod tidy
Expand Down
29 changes: 29 additions & 0 deletions app-service-template/Attribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,32 @@ https://github.com/googleapis/go-genproto/blob/main/LICENSE
nhooyr.io/websocket (ISC License) - https://github.com/nhooyr/websocket
https://github.com/nhooyr/websocket/blob/master/LICENSE.txt

github.com/barkimedes/go-deepcopy (MIT) https://github.com/barkimedes/go-deepcopy
https://github.com/barkimedes/go-deepcopy/blob/master/LICENSE

github.com/go-jose/go-jose/v4 (Apache-2.0) https://github.com/go-jose/go-jose
https://github.com/go-jose/go-jose/blob/main/LICENSE

github.com/jackc/pgerrcode (MIT) https://github.com/jackc/pgerrcode
https://github.com/jackc/pgerrcode/blob/master/LICENSE

github.com/jackc/pgpassfile (MIT) https://github.com/jackc/pgpassfile
https://github.com/jackc/pgpassfile/blob/master/LICENSE

github.com/jackc/pgservicefile (MIT) https://github.com/jackc/pgservicefile
https://github.com/jackc/pgservicefile/blob/master/LICENSE

github.com/jackc/pgx/v5 (MIT) https://github.com/jackc/pgx
https://github.com/jackc/pgx/blob/master/LICENSE

github.com/jackc/puddle/v2 (MIT) https://github.com/jackc/puddle
https://github.com/jackc/puddle/blob/master/LICENSE

github.com/openziti/channel/v3 (Apache 2.0) - github.com/openziti/channel/v3
https://github.com/openziti/channel/blob/main/LICENSE

spf13/cast (MIT) https://github.com/spf13/cast
https://github.com/spf13/cast/blob/master/LICENSE

gopkg.in/go-jose/go-jose.v2 (Apache 2.0) - https://github.com/go-jose/go-jose
https://github.com/go-jose/go-jose/blob/v2.6.3/LICENSE
4 changes: 2 additions & 2 deletions app-service-template/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

#build stage
ARG BASE=golang:1.21-alpine3.18
ARG BASE=golang:1.23-alpine3.20
FROM ${BASE} AS builder

ARG ALPINE_PKG_BASE="make git"
Expand All @@ -33,7 +33,7 @@ ARG MAKE="make build"
RUN $MAKE

#final stage
FROM alpine:3.18
FROM alpine:3.20
# TODO: Change Copyright to your company if open sourcing or remove label
LABEL license='SPDX-License-Identifier: Apache-2.0' \
copyright='Copyright (c) 2022: Intel'
Expand Down
80 changes: 40 additions & 40 deletions app-service-template/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

module app-new-service

go 1.21
go 1.23

// To build local docker image of the template App you must
// comment out this replace statement and update the SDK version to latest
replace github.com/edgexfoundry/app-functions-sdk-go/v3 => ../

require (
github.com/edgexfoundry/app-functions-sdk-go/v3 v3.1.1
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.32
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.49
github.com/google/uuid v1.6.0
github.com/labstack/echo/v4 v4.11.4
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
Expand All @@ -27,11 +27,11 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/diegoholiveira/jsonlogic/v3 v3.5.3 // indirect
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.52 // indirect
github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.12 // indirect
github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.31 // indirect
github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.13 // indirect
github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.9 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.60 // indirect
github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.17 // indirect
github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.35 // indirect
github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.16 // indirect
github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.13 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect
Expand All @@ -55,18 +55,18 @@ require (
github.com/go-openapi/validate v0.24.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.22.0 // indirect
github.com/go-playground/validator/v10 v10.22.1 // indirect
github.com/go-redis/redis/v7 v7.3.0 // indirect
github.com/go-resty/resty/v2 v2.13.1 // indirect
github.com/go-resty/resty/v2 v2.15.3 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/gomodule/redigo v2.0.0+incompatible // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/schema v1.4.1 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/consul/api v1.29.2 // indirect
github.com/hashicorp/consul/api v1.29.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
Expand All @@ -77,9 +77,9 @@ require (
github.com/hashicorp/serf v0.10.1 // indirect
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.6.0 // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgx/v5 v5.7.1 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kataras/go-events v0.0.3 // indirect
github.com/klauspost/compress v1.17.2 // indirect
Expand All @@ -99,19 +99,19 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/muhlemmer/gu v0.3.1 // indirect
github.com/nats-io/nats.go v1.36.0 // indirect
github.com/nats-io/nats.go v1.37.0 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openziti/channel/v2 v2.0.136 // indirect
github.com/openziti/edge-api v0.26.21 // indirect
github.com/openziti/foundation/v2 v2.0.47 // indirect
github.com/openziti/identity v1.0.81 // indirect
github.com/openziti/metrics v1.2.56 // indirect
github.com/openziti/sdk-golang v0.23.39 // indirect
github.com/openziti/secretstream v0.1.21 // indirect
github.com/openziti/transport/v2 v2.0.138 // indirect
github.com/openziti/channel/v3 v3.0.4 // indirect
github.com/openziti/edge-api v0.26.32 // indirect
github.com/openziti/foundation/v2 v2.0.49 // indirect
github.com/openziti/identity v1.0.85 // indirect
github.com/openziti/metrics v1.2.58 // indirect
github.com/openziti/sdk-golang v0.23.43 // indirect
github.com/openziti/secretstream v0.1.25 // indirect
github.com/openziti/transport/v2 v2.0.146 // indirect
github.com/orcaman/concurrent-map/v2 v2.0.1 // indirect
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand All @@ -121,7 +121,7 @@ require (
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/speps/go-hashids v2.0.0+incompatible // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spiffe/go-spiffe/v2 v2.3.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand All @@ -131,25 +131,25 @@ require (
github.com/x448/float16 v0.8.4 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
github.com/zeebo/errs v1.3.0 // indirect
github.com/zitadel/oidc/v2 v2.12.0 // indirect
go.mongodb.org/mongo-driver v1.16.0 // indirect
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
github.com/zitadel/oidc/v2 v2.12.2 // indirect
go.mongodb.org/mongo-driver v1.17.0 // indirect
go.mozilla.org/pkcs7 v0.9.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.6.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
nhooyr.io/websocket v1.8.11 // indirect
nhooyr.io/websocket v1.8.17 // indirect
)
Loading

0 comments on commit 5b9efd6

Please sign in to comment.