From c7ed11be989f73e0f6a1d05acab126b11de5a1a1 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Tue, 23 Aug 2022 13:39:42 +0300 Subject: [PATCH] fix(deps): bump github.com/go-chi/chi from 4.0.3+incompatible to 5.0.7 (#422) Fixed Write method in StructuredLoggerEntry. Signed-off-by: Ivan Mikheykin --- go.mod | 2 +- go.sum | 4 ++-- pkg/debug/server.go | 4 ++-- pkg/shell-operator/debug_server.go | 2 +- pkg/utils/structured-logger/structured-logger.go | 4 ++-- pkg/webhook/conversion/handler.go | 4 ++-- pkg/webhook/server/server.go | 2 +- pkg/webhook/server/server_test.go | 2 +- pkg/webhook/validating/handler.go | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 5535ccbd..85cf0b31 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/flant/kube-client v0.0.6 github.com/flant/libjq-go v1.6.2-0.20200616114952-907039e8a02a // branch: master - github.com/go-chi/chi v4.0.3+incompatible + github.com/go-chi/chi/v5 v5.0.7 github.com/go-openapi/spec v0.19.8 github.com/go-openapi/strfmt v0.19.5 github.com/go-openapi/swag v0.19.9 diff --git a/go.sum b/go.sum index 7663de33..78b1ffeb 100644 --- a/go.sum +++ b/go.sum @@ -108,8 +108,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-chi/chi v4.0.3+incompatible h1:gakN3pDJnzZN5jqFV2TEdF66rTfKeITyR8qu6ekICEY= -github.com/go-chi/chi v4.0.3+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8= +github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= diff --git a/pkg/debug/server.go b/pkg/debug/server.go index bef6cff5..16e4edb1 100644 --- a/pkg/debug/server.go +++ b/pkg/debug/server.go @@ -8,8 +8,8 @@ import ( "os" "path" - "github.com/go-chi/chi" - "github.com/go-chi/chi/middleware" + "github.com/go-chi/chi/v5" + "github.com/go-chi/chi/v5/middleware" log "github.com/sirupsen/logrus" "sigs.k8s.io/yaml" diff --git a/pkg/shell-operator/debug_server.go b/pkg/shell-operator/debug_server.go index bc614ce2..70e4a827 100644 --- a/pkg/shell-operator/debug_server.go +++ b/pkg/shell-operator/debug_server.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "github.com/flant/shell-operator/pkg/app" "github.com/flant/shell-operator/pkg/config" diff --git a/pkg/utils/structured-logger/structured-logger.go b/pkg/utils/structured-logger/structured-logger.go index e33b5a1c..d6e0460e 100644 --- a/pkg/utils/structured-logger/structured-logger.go +++ b/pkg/utils/structured-logger/structured-logger.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/go-chi/chi/middleware" + "github.com/go-chi/chi/v5/middleware" "github.com/sirupsen/logrus" ) @@ -42,7 +42,7 @@ type StructuredLoggerEntry struct { Logger logrus.FieldLogger } -func (l *StructuredLoggerEntry) Write(status, bytes int, elapsed time.Duration) { +func (l *StructuredLoggerEntry) Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{}) { l.Logger = l.Logger.WithFields(logrus.Fields{ "resp_status": status, "resp_bytes_length": bytes, diff --git a/pkg/webhook/conversion/handler.go b/pkg/webhook/conversion/handler.go index e7d2d2a7..8d9d872f 100644 --- a/pkg/webhook/conversion/handler.go +++ b/pkg/webhook/conversion/handler.go @@ -7,8 +7,8 @@ import ( "net/http" "strings" - "github.com/go-chi/chi" - "github.com/go-chi/chi/middleware" + "github.com/go-chi/chi/v5" + "github.com/go-chi/chi/v5/middleware" log "github.com/sirupsen/logrus" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" diff --git a/pkg/webhook/server/server.go b/pkg/webhook/server/server.go index 60ae8837..58d801d4 100644 --- a/pkg/webhook/server/server.go +++ b/pkg/webhook/server/server.go @@ -10,7 +10,7 @@ import ( "os" "time" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" log "github.com/sirupsen/logrus" ) diff --git a/pkg/webhook/server/server_test.go b/pkg/webhook/server/server_test.go index a71763df..dc996d25 100644 --- a/pkg/webhook/server/server_test.go +++ b/pkg/webhook/server/server_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "testing" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" ) func Test_ServerStart(t *testing.T) { diff --git a/pkg/webhook/validating/handler.go b/pkg/webhook/validating/handler.go index 7826d05f..4fc38bba 100644 --- a/pkg/webhook/validating/handler.go +++ b/pkg/webhook/validating/handler.go @@ -7,8 +7,8 @@ import ( "net/http" "strings" - "github.com/go-chi/chi" - "github.com/go-chi/chi/middleware" + "github.com/go-chi/chi/v5" + "github.com/go-chi/chi/v5/middleware" log "github.com/sirupsen/logrus" v1 "k8s.io/api/admission/v1"