From d9620bb0721325e880aa72662f20aca00605c66b Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Sun, 28 Aug 2022 14:20:03 +0800 Subject: [PATCH] chore: remove unused packages (#2312) --- go.mod | 1 - go.sum | 2 -- rest/handler/tracinghandler_test.go | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 4bf784af..0e1eee19 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.3.0 github.com/jhump/protoreflect v1.12.0 - github.com/justinas/alice v1.2.0 github.com/lib/pq v1.10.6 github.com/olekukonko/tablewriter v0.0.5 github.com/pelletier/go-toml/v2 v2.0.5 diff --git a/go.sum b/go.sum index 3494820f..6dd18ba3 100644 --- a/go.sum +++ b/go.sum @@ -280,8 +280,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= -github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= diff --git a/rest/handler/tracinghandler_test.go b/rest/handler/tracinghandler_test.go index 94af55e0..7f1948dd 100644 --- a/rest/handler/tracinghandler_test.go +++ b/rest/handler/tracinghandler_test.go @@ -6,9 +6,9 @@ import ( "net/http/httptest" "testing" - "github.com/justinas/alice" "github.com/stretchr/testify/assert" ztrace "github.com/zeromicro/go-zero/core/trace" + "github.com/zeromicro/go-zero/rest/chain" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" @@ -24,7 +24,7 @@ func TestOtelHandler(t *testing.T) { for _, test := range []string{"", "bar"} { t.Run(test, func(t *testing.T) { - h := alice.New(TracingHandler("foo", test)).Then( + h := chain.New(TracingHandler("foo", test)).Then( http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := otel.GetTextMapPropagator().Extract(r.Context(), propagation.HeaderCarrier(r.Header)) spanCtx := trace.SpanContextFromContext(ctx)