From ec672fbd497a8284676907c29d15ac41d2e50cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Mon, 7 Oct 2024 17:19:30 +0200 Subject: [PATCH] v0.0.527 --- exerr/builder.go | 4 +++- exerr/proxy.go | 13 +++++++++++++ go.mod | 2 +- go.sum | 2 ++ goextVersion.go | 4 ++-- 5 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 exerr/proxy.go diff --git a/exerr/builder.go b/exerr/builder.go index 016d85f..94edf6a 100644 --- a/exerr/builder.go +++ b/exerr/builder.go @@ -450,7 +450,7 @@ func (b *Builder) Output(ctx context.Context, g *gin.Context) { // Print prints the error // If the error is SevErr we also send it to the error-service -func (b *Builder) Print(ctxs ...context.Context) { +func (b *Builder) Print(ctxs ...context.Context) Proxy { warnOnPkgConfigNotInitialized() for _, dctx := range ctxs { @@ -468,6 +468,8 @@ func (b *Builder) Print(ctxs ...context.Context) { } b.errorData.CallListener(MethodPrint) + + return Proxy{v: *b.errorData} // we return Proxy here instead of Exerr to prevent warnings on ignored err-returns } func (b *Builder) Format(level LogPrintLevel) string { diff --git a/exerr/proxy.go b/exerr/proxy.go new file mode 100644 index 0000000..cdc889d --- /dev/null +++ b/exerr/proxy.go @@ -0,0 +1,13 @@ +package exerr + +type Proxy struct { + v ExErr +} + +func (p *Proxy) UniqueID() string { + return p.v.UniqueID +} + +func (p *Proxy) Get() ExErr { + return p.v +} diff --git a/go.mod b/go.mod index 3ed4367..fb1e6c1 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( golang.org/x/image v0.21.0 // indirect golang.org/x/net v0.30.0 // indirect golang.org/x/text v0.19.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.37.6 // indirect modernc.org/mathutil v1.6.0 // indirect diff --git a/go.sum b/go.sum index a01a717..6505ee5 100644 --- a/go.sum +++ b/go.sum @@ -168,6 +168,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/goextVersion.go b/goextVersion.go index 90020c6..438e234 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.526" +const GoextVersion = "0.0.527" -const GoextVersionTimestamp = "2024-10-05T23:59:23+0200" +const GoextVersionTimestamp = "2024-10-07T17:19:30+0200"