From 228da861f9c0122cbf06ff06c37ab3ed34866b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Vo=C3=9F?= Date: Mon, 31 Aug 2020 09:41:25 +0200 Subject: [PATCH] [stacktrace] Switch to interuss fork --- go.mod | 4 +++- go.sum | 2 ++ pkg/errors/errors_test.go | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 pkg/errors/errors_test.go diff --git a/go.mod b/go.mod index 9a7d9769f..b36bcd0b3 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,8 @@ module github.com/interuss/dss // This forked version of openapi2proto has limited support for Open API v3. replace github.com/NYTimes/openapi2proto => github.com/davidsansome/openapi2proto v0.2.3-0.20190826092301-b98d13b38dab +replace github.com/palantir/stacktrace => github.com/interuss/stacktrace v0.0.0-20200827180054-b2e58cf48818 + go 1.14 require ( @@ -19,7 +21,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 github.com/grpc-ecosystem/grpc-gateway v1.14.3 github.com/lib/pq v1.5.2 - github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177 + github.com/palantir/stacktrace v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.5.1 go.uber.org/multierr v1.5.0 go.uber.org/zap v1.15.0 diff --git a/go.sum b/go.sum index ef94e3e5d..1d33fa168 100644 --- a/go.sum +++ b/go.sum @@ -176,6 +176,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/interuss/stacktrace v0.0.0-20200827180054-b2e58cf48818 h1:1XBDiwBRtL6NKZpycmO0RDP7ZzIZLNZknFKNf/6L3gw= +github.com/interuss/stacktrace v0.0.0-20200827180054-b2e58cf48818/go.mod h1:WwNxCSINli7iw/AvwTCnlvC664Db+oItGERbj3XNFTg= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= diff --git a/pkg/errors/errors_test.go b/pkg/errors/errors_test.go new file mode 100644 index 000000000..4fe5c9e22 --- /dev/null +++ b/pkg/errors/errors_test.go @@ -0,0 +1,14 @@ +package errors + +import ( + "errors" + "testing" + + "github.com/palantir/stacktrace" + "github.com/stretchr/testify/assert" +) + +func TestStacktraceUnwrap(t *testing.T) { + cause := errors.New("test") + assert.Equal(t, cause, errors.Unwrap(stacktrace.Propagate(cause, "test"))) +}