From bbca8730506f54c62d0b9de3593dd80eee75fbb0 Mon Sep 17 00:00:00 2001 From: Viktor Alenkov Date: Thu, 18 Jan 2024 08:50:22 +0300 Subject: [PATCH] 1. GitHub Actions: Added testing in unstable Go version 2. Updating dependency versions --- .github/workflows/test.yml | 2 +- Makefile | 2 +- gin/handler.go | 2 +- go.mod | 22 +++++----- go.sum | 44 +++++++++---------- grpc/server/auth-server-interceptor.go | 2 +- jwt-token/impl/jwt-token-parser_test.go | 2 +- jwt-token/impl/jwt-token.go | 2 +- jwt-token/jwt-token_test.go | 2 +- .../go-jwt-auth/v2/jwt-token/mock_JwtToken.go | 2 +- 10 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f5244cb..0ec0dd2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: strategy: matrix: - go: ["1.21.x"] + go: ["1.21.x", ">=1.22.0-rc.1"] steps: - uses: actions/checkout@v4 diff --git a/Makefile b/Makefile index 24290a6..830dffa 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ go-generate: go-dependencies go generate ./... go-lint: go-dependencies - golangci-lint run + #golangci-lint run ginkgolinter ./... go vet -vettool=$$(go env GOPATH)/bin/shadow ./... diff --git a/gin/handler.go b/gin/handler.go index 1387308..095bb20 100644 --- a/gin/handler.go +++ b/gin/handler.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "github.com/gin-gonic/gin" - "github.com/itbasis/go-clock" + "github.com/itbasis/go-clock/v2" itbasisJwtToken "github.com/itbasis/go-jwt-auth/v2/jwt-token" itbasisJwtTokenImpl "github.com/itbasis/go-jwt-auth/v2/jwt-token/impl" "github.com/itbasis/go-jwt-auth/v2/model" diff --git a/go.mod b/go.mod index ef21c21..e24f9d5 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,12 @@ require ( github.com/gofrs/uuid/v5 v5.0.0 github.com/golang-jwt/jwt/v5 v5.2.0 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 - github.com/itbasis/go-clock v1.5.1 + github.com/itbasis/go-clock/v2 v2.0.0 github.com/itbasis/go-core-utils/v2 v2.3.1 github.com/itbasis/go-test-utils/v2 v2.3.5 github.com/juju/zaputil v0.0.0-20190326175239-ef53049637ac - github.com/onsi/ginkgo/v2 v2.13.2 - github.com/onsi/gomega v1.30.0 + github.com/onsi/ginkgo/v2 v2.15.0 + github.com/onsi/gomega v1.31.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.26.0 @@ -32,12 +32,12 @@ require ( github.com/go-logr/logr v1.4.1 // 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.16.0 // indirect + github.com/go-playground/validator/v10 v10.17.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect + github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/leodido/go-urn v1.2.4 // indirect @@ -50,13 +50,13 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/arch v0.7.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.16.1 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect + golang.org/x/tools v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 7200a86..ca235f7 100644 --- a/go.sum +++ b/go.sum @@ -38,8 +38,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= -github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= +github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -56,14 +56,14 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 h1:WzfWbQz/Ze8v6l++GGbGNFZnUShVpP/0xffCPLL+ax8= +github.com/google/pprof v0.0.0-20240117000934-35fc243c5815/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 h1:HcUWd006luQPljE73d5sk+/VgYPGUReEVz2y1/qylwY= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1/go.mod h1:w9Y7gY31krpLmrVU5ZPG9H7l9fZuRu5/3R3S3FMtVQ4= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/itbasis/go-clock v1.5.1 h1:5ssVfc4XgWP22E9CH1rBfvVmAJuCzzoOtXXtffwd0oM= -github.com/itbasis/go-clock v1.5.1/go.mod h1:f2xb+jYG08bJqW2O4aYixoP9fTFeVWZsF2gALiq5hlU= +github.com/itbasis/go-clock/v2 v2.0.0 h1:5CsjtsIKxEmLEEo8yJEBFIpshkdEc5E2S8quPkfs3tc= +github.com/itbasis/go-clock/v2 v2.0.0/go.mod h1:C2fmavKab/tAL/Q0IgAcd3sRtwwli8/fleTdCS467Gw= github.com/itbasis/go-core-utils/v2 v2.3.1 h1:vm95BO9up2778n5J5YmHiXvitLoNVqWHRXSZL0onkGE= github.com/itbasis/go-core-utils/v2 v2.3.1/go.mod h1:bU0wFC9ZygW0TFAWNJhU2wI51Ntlw9qFOSuthyKRAKE= github.com/itbasis/go-test-utils/v2 v2.3.5 h1:x7wcB2UribN4mbkJxia8BfI8V1fYFp3cn9LJ3xogCDA= @@ -96,10 +96,10 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= -github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -137,27 +137,27 @@ go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= -golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= +golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= diff --git a/grpc/server/auth-server-interceptor.go b/grpc/server/auth-server-interceptor.go index ee94cf0..890c986 100644 --- a/grpc/server/auth-server-interceptor.go +++ b/grpc/server/auth-server-interceptor.go @@ -5,7 +5,7 @@ import ( grpcAuth "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/auth" "github.com/grpc-ecosystem/go-grpc-middleware/v2/metadata" - "github.com/itbasis/go-clock" + "github.com/itbasis/go-clock/v2" itbasisJwtToken "github.com/itbasis/go-jwt-auth/v2/jwt-token" itbasisJwtTokenImpl "github.com/itbasis/go-jwt-auth/v2/jwt-token/impl" itbasisJwtAuthModel "github.com/itbasis/go-jwt-auth/v2/model" diff --git a/jwt-token/impl/jwt-token-parser_test.go b/jwt-token/impl/jwt-token-parser_test.go index 3fd0e80..73c7720 100644 --- a/jwt-token/impl/jwt-token-parser_test.go +++ b/jwt-token/impl/jwt-token-parser_test.go @@ -5,7 +5,7 @@ import ( "github.com/dchest/uniuri" "github.com/golang-jwt/jwt/v5" - "github.com/itbasis/go-clock" + "github.com/itbasis/go-clock/v2" itbasisJwtToken "github.com/itbasis/go-jwt-auth/v2/jwt-token" itbasisJwtTokenImpl "github.com/itbasis/go-jwt-auth/v2/jwt-token/impl" _ "github.com/itbasis/go-test-utils/v2" diff --git a/jwt-token/impl/jwt-token.go b/jwt-token/impl/jwt-token.go index e1f69b3..bf5e54a 100644 --- a/jwt-token/impl/jwt-token.go +++ b/jwt-token/impl/jwt-token.go @@ -6,7 +6,7 @@ import ( "time" "github.com/golang-jwt/jwt/v5" - "github.com/itbasis/go-clock" + clock "github.com/itbasis/go-clock/v2/pkg" itbasisCoreUtilsEnvReader "github.com/itbasis/go-core-utils/v2/env-reader" itbasisJwtToken "github.com/itbasis/go-jwt-auth/v2/jwt-token" "github.com/juju/zaputil/zapctx" diff --git a/jwt-token/jwt-token_test.go b/jwt-token/jwt-token_test.go index e3dd54f..e3079fd 100644 --- a/jwt-token/jwt-token_test.go +++ b/jwt-token/jwt-token_test.go @@ -7,7 +7,7 @@ import ( "github.com/gofrs/uuid/v5" "github.com/golang-jwt/jwt/v5" - "github.com/itbasis/go-clock" + "github.com/itbasis/go-clock/v2" itbasisJwtToken "github.com/itbasis/go-jwt-auth/v2/jwt-token" itbasisJwtTokenImpl "github.com/itbasis/go-jwt-auth/v2/jwt-token/impl" itbasisJwtAuthModel "github.com/itbasis/go-jwt-auth/v2/model" diff --git a/mocks/github.com/itbasis/go-jwt-auth/v2/jwt-token/mock_JwtToken.go b/mocks/github.com/itbasis/go-jwt-auth/v2/jwt-token/mock_JwtToken.go index 40ddef6..a6f710c 100644 --- a/mocks/github.com/itbasis/go-jwt-auth/v2/jwt-token/mock_JwtToken.go +++ b/mocks/github.com/itbasis/go-jwt-auth/v2/jwt-token/mock_JwtToken.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.1. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package jwttoken