Skip to content

Commit

Permalink
Merge pull request #74 from jinlinGuan/golang-1.23
Browse files Browse the repository at this point in the history
build: Upgrade to go-1.23, Linter1.61.0 and Alpine 3.20
  • Loading branch information
cloudxxx8 authored Oct 4, 2024
2 parents 23327ee + 44e0fc2 commit 69ede8b
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 105 deletions.
8 changes: 7 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
linters:
disable:
enable:
- gosec
- gosec
linters-settings:
gosec:
excludes:
# G115: integer overflow conversion
# exclude the rule since it tends to be false positive
- G115
196 changes: 196 additions & 0 deletions Attribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,199 @@ https://cs.opensource.google/go/x/exp/+/master:LICENSE

golang.org/x/time (BSD-3) https://cs.opensource.google/go/x/time
https://cs.opensource.google/go/x/time/+/master:LICENSE

github.com/asaskevich/govalidator (MIT) https://github.com/asaskevich/govalidator
https://github.com/asaskevich/govalidator/blob/master/LICENSE

github.com/cenkalti/backoff/v4 (MIT) https://github.com/cenkalti/backoff
https://github.com/cenkalti/backoff/blob/v4/LICENSE

github.com/fsnotify/fsnotify (BSD-3) https://github.com/fsnotify/fsnotify
https://github.com/fsnotify/fsnotify/blob/main/LICENSE

github.com/fullsailor/pkcs7 (MIT) https://github.com/fullsailor/pkcs7
https://github.com/fullsailor/pkcs7/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/go-logr/logr (Apache-2.0) https://github.com/go-logr/logr
https://github.com/go-logr/logr/blob/master/LICENSE

github.com/go-logr/stdr (Apache-2.0) https://github.com/go-log/stdr
https://github.com/go-logr/stdr/blob/master/LICENSE

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

github.com/go-openapi/analysis (Apache-2.0) https://github.com/go-openapi/analysis
https://github.com/go-openapi/analysis/blob/master/LICENSE

github.com/go-openapi/errors (Apache-2.0) https://github.com/go-openapi/errors
https://github.com/go-openapi/errors/blob/master/LICENSE

github.com/go-openapi/jsonpointer (Apache-2.0) https://github.com/go-openapi/jsonpointer
https://github.com/go-openapi/jsonpointer/blob/master/LICENSE

github.com/go-openapi/jsonreference (Apache-2.0) https://github.com/go-openapi/jsonreference
https://github.com/go-openapi/jsonreference/blob/master/LICENSE

github.com/go-openapi/loads (Apache-2.0) https://github.com/go-openapi/loads
https://github.com/go-openapi/loads/blob/master/LICENSE

github.com/go-openapi/runtime (Apache-2.0) https://github.com/go-openapi/runtime
https://github.com/go-openapi/runtime/blob/master/LICENSE

github.com/go-openapi/spec (Apache-2.0) https://github.com/go-openapi/spec
https://github.com/go-openapi/spec/blob/master/LICENSE

github.com/go-openapi/strfmt (Apache-2.0) https://github.com/go-openapi/strfmt
https://github.com/go-openapi/strfmt/blob/master/LICENSE

github.com/go-openapi/swag (Apache-2.0) https://github.com/go-openapi/swag
https://github.com/go-openapi/swag/blob/master/LICENSE

github.com/go-openapi/validate (Apache-2.0) https://github.com/go-openapi/validate
https://github.com/go-openapi/validate/blob/master/LICENSE

github.com/go-resty/resty/v2 (MIT) https://github.com/go-resty/resty
https://github.com/go-resty/resty/blob/v2/LICENSE

github.com/golang-jwt/jwt/v5 (MIT) github.com/golang-jwt/jwt
https://github.com/golang-jwt/jwt/blob/main/LICENSE

gorilla/mux 1.6.2 (BSD-3) https://github.com/gorilla/mux
https://github.com/gorilla/mux/blob/master/LICENSE

github.com/gorilla/schema (BSD-3) https://github.com/gorilla/schema
https://github.com/gorilla/schema/blob/main/LICENSE

github.com/gorilla/securecookie (BSD-3) https://github.com/gorilla/securecookie
https://github.com/gorilla/securecookie/blob/main/LICENSE

github.com/josharian/intern (MIT) https://github.com/josharian/intern
https://github.com/josharian/intern/blob/master/LICENSE.md

github.com/kataras/go-events (MIT) https://github.com/kataras/go-events
https://github.com/kataras/go-events/blob/master/LICENSE

github.com/lufia/plan9stats (BSD-3) https://github.com/lufia/plan9stats
https://github.com/lufia/plan9stats/blob/main/LICENSE

github.com/mailru/easyjson (MIT) https://github.com/mailru/easyjson
https://github.com/mailru/easyjson/blob/master/LICENSE

github.com/mgutz/ansi (MIT) https://github.com/mgutz/ansi
https://github.com/mgutz/ansi/blob/master/LICENSE

github.com/michaelquigley/pfxlog (MIT) https://github.com/michaelquigley/pfxlog
https://github.com/michaelquigley/pfxlog/blob/main/LICENSE

github.com/miekg/pkcs11 (BSD-3) https://github.com/miekg/pkcs11
https://github.com/miekg/pkcs11/blob/master/LICENSE

github.com/mitchellh/go-ps (MIT) https://github.com/mitchellh/go-ps
https://github.com/mitchellh/go-ps/blob/master/LICENSE.md

github.com/muhlemmer/gu (Unspecified) https://github.com/muhlemmer/gu
https://github.com/muhlemmer/gu/blob/main/LICENSE

github.com/oklog/ulid (Apache-2.0) https://github.com/oklog/ulid
https://github.com/oklog/ulid/blob/main/LICENSE

github.com/opentracing/opentracing-go (Apache-2.0) https://github.com/opentracing/opentracing-go
https://github.com/opentracing/opentracing-go/blob/master/LICENSE

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

github.com/openziti/edge-api (Apache-2.0) https://github.com/openziti/edge-api
https://github.com/openziti/edge-api/blob/main/LICENSE

github.com/openziti/foundation/v2 (Apache-2.0) https://github.com/openziti/foundation
https://github.com/openziti/foundation/blob/main/LICENSE

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

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

github.com/openziti/sdk-golang (Apache-2.0) https://github.com/openziti/sdk-golang
https://github.com/openziti/sdk-golang/blob/main/LICENSE

github.com/openziti/secretstream (MIT) https://github.com/openziti/secretstream
https://github.com/openziti/secretstream/blob/main/LICENSE

github.com/openziti/transport/v2 (Apache-2.0) https://github.com/openziti/transport
https://github.com/openziti/transport/blob/main/LICENSE

github.com/orcaman/concurrent-map/v2 (MIT) https://github.com/orcaman/concurrent-map/
https://github.com/orcaman/concurrent-map/blob/master/LICENSE

github.com/panjf2000/ants/v2 (MIT) https://github.com/panjf2000/ants
https://github.com/panjf2000/ants/blob/dev/LICENSE

github.com/parallaxsecond/parsec-client-go (Apache-2.0) https://github.com/parallaxsecond/parsec-client-go
https://github.com/parallaxsecond/parsec-client-go/blob/main/LICENSE

github.com/pkg/errors (BSD-2) https://github.com/pkg/errors
https://github.com/pkg/errors/blob/master/LICENSE

github.com/power-devops/perfstat (MIT) https://github.com/power-devops/perfstat
https://github.com/power-devops/perfstat/blob/main/LICENSE

github.com/shirou/gopsutil/v3 (BSD) https://github.com/shirou/gopsutil
https://github.com/shirou/gopsutil/blob/master/LICENSE

github.com/shoenig/go-m1cpu (Mozilla Public License 2.0) https://github.com/shoenig/go-m1cpu
https://github.com/shoenig/go-m1cpu/blob/main/LICENSE

github.com/sirupsen/logrus (MIT) https://github.com/sirupsen/logrus
https://github.com/sirupsen/logrus/blob/master/LICENSE

github.com/speps/go-hashids (MIT) https://github.com/speps/go-hashids
https://github.com/speps/go-hashids/blob/master/LICENSE

github.com/tklauser/go-sysconf (BSD-3) https://github.com/tklauser/go-sysconf
https://github.com/tklauser/go-sysconf/blob/main/LICENSE

github.com/tklauser/numcpus (Apache-2.0) https://github.com/tklauser/numcpus
https://github.com/tklauser/numcpus/blob/main/LICENSE

github.com/yusufpapurcu/wmi (MIT) https://github.com/yusufpapurcu/wmi/
https://github.com/yusufpapurcu/wmi/blob/master/LICENSE

github.com/zitadel/oidc/v2 (Apache-2.0) https://github.com/zitadel/oidc
https://github.com/zitadel/oidc/blob/main/LICENSE

go.mongodb.org/mongo-driver (Apache-2.0) https://github.com/mongodb/mongo-go-driver
https://github.com/mongodb/mongo-go-driver/blob/v1/LICENSE

go.mozilla.org/pkcs7 (MIT) https://github.com/mozilla-services/pkcs7
https://github.com/mozilla-services/pkcs7/blob/master/LICENSE

go.opentelemetry.io/otel (Apache-2.0) https://github.com/open-telemetry/opentelemetry-go
https://github.com/open-telemetry/opentelemetry-go/blob/main/LICENSE

go.opentelemetry.io/otel/metric (Apache-2.0) https://github.com/open-telemetry/opentelemetry-go
https://github.com/open-telemetry/opentelemetry-go/blob/main/LICENSE

go.opentelemetry.io/otel/trace (Apache-2.0) https://github.com/open-telemetry/opentelemetry-go
https://github.com/open-telemetry/opentelemetry-go/blob/main/LICENSE

golang.org/x/oauth2 (Unspecified) https://cs.opensource.google/go/x/oauth2
https://cs.opensource.google/go/x/oauth2/+/master:LICENSE

golang.org/x/term (Unspecified) https://cs.opensource.google/go/x/term
https://cs.opensource.google/go/x/term/+/master:LICENSE

google.golang.org/genproto/googleapis/rpc (Apache-2.0) https://github.com/googleapis/go-genproto
https://github.com/googleapis/go-genproto/blob/main/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

nhooyr.io/websocket (ISC) https://github.com/nhooyr/websocket
https://github.com/nhooyr/websocket/blob/master/LICENSE.txt

5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) 2022 Jiangxing Intelligence
# Copyright (c) 20223 Intel Corporation
# Copyright (c) 2024 IOTech Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,7 +16,7 @@
# limitations under the License.
#

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

ARG ALPINE_PKG_BASE="make git openssh-client"
Expand All @@ -39,7 +40,7 @@ COPY . .
ARG MAKE="make -e ADD_BUILD_TAGS=$ADD_BUILD_TAGS build"
RUN ${MAKE}

FROM alpine:3.18
FROM alpine:3.20

LABEL license='SPDX-License-Identifier: Apache-2.0' \
copyright='Copyright (c) 2021: Jiangxing Intelligence'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.54.2
sudo curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.61.0

test: unittest lint
go vet ./...
Expand Down
54 changes: 27 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/edgexfoundry/device-uart

go 1.21
go 1.23

require (
github.com/edgexfoundry/device-sdk-go/v3 v3.2.0-dev.37
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.43
github.com/edgexfoundry/device-sdk-go/v3 v3.2.0-dev.41
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.47
github.com/spf13/cast v1.7.0
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
)
Expand All @@ -17,11 +17,11 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.57 // 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-messaging/v3 v3.2.0-dev.37 // 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.12 // 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 @@ -45,16 +45,16 @@ 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/google/uuid v1.6.0 // 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.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand Down Expand Up @@ -90,14 +90,14 @@ require (
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.23 // 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.40 // 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/panjf2000/ants/v2 v2.10.0 // indirect
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 // indirect
Expand All @@ -116,25 +116,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
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.29.0 // indirect
golang.org/x/oauth2 v0.21.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.5.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 69ede8b

Please sign in to comment.