From f9122149c3d4e29fdd62643afe3cff4b40681ebb Mon Sep 17 00:00:00 2001 From: Alex Guerrieri Date: Tue, 23 Apr 2024 15:36:07 +0200 Subject: [PATCH] use interface --- _examples/golang-basics/example.gen.go | 2 +- _examples/golang-imports/api.gen.go | 2 +- errors.go.tmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_examples/golang-basics/example.gen.go b/_examples/golang-basics/example.gen.go index 5a953cf..ec39d94 100644 --- a/_examples/golang-basics/example.gen.go +++ b/_examples/golang-basics/example.gen.go @@ -864,7 +864,7 @@ func (e WebRPCError) WithCause(cause error) WebRPCError { return err } -func (e WebRPCError) WithCausef(msg string, args ...any) WebRPCError { +func (e WebRPCError) WithCausef(fmt string, args ...interface{}) WebRPCError { return e.WithCause(fmt.Errorf(msg, args...)) } diff --git a/_examples/golang-imports/api.gen.go b/_examples/golang-imports/api.gen.go index e3b390c..ae7a546 100644 --- a/_examples/golang-imports/api.gen.go +++ b/_examples/golang-imports/api.gen.go @@ -574,7 +574,7 @@ func (e WebRPCError) WithCause(cause error) WebRPCError { return err } -func (e WebRPCError) WithCausef(msg string, args ...any) WebRPCError { +func (e WebRPCError) WithCausef(fmt string, args ...interface{}) WebRPCError { return e.WithCause(fmt.Errorf(msg, args...)) } diff --git a/errors.go.tmpl b/errors.go.tmpl index 5ede32e..e1dd2a1 100644 --- a/errors.go.tmpl +++ b/errors.go.tmpl @@ -58,7 +58,7 @@ func (e WebRPCError) WithCause(cause error) WebRPCError { return err } -func (e WebRPCError) WithCausef(msg string, args ...any) WebRPCError { +func (e WebRPCError) WithCausef(fmt string, args ...interface{}) WebRPCError { return e.WithCause(fmt.Errorf(msg, args...)) }