Skip to content

Commit

Permalink
Fix .Causef() syntax error (shadowed fmt pkg name) (#66)
Browse files Browse the repository at this point in the history
fmt.Errorf undefined (type string has no field or method Errorf)
  • Loading branch information
VojtechVitek authored Apr 23, 2024
1 parent 66c95b9 commit badb0e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions _examples/golang-basics/example.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions _examples/golang-imports/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions errors.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func (e WebRPCError) WithCause(cause error) WebRPCError {
return err
}

func (e WebRPCError) WithCausef(fmt string, args ...interface{}) WebRPCError {
cause := fmt.Errorf(fmt, args...)
func (e WebRPCError) WithCausef(format string, args ...interface{}) WebRPCError {
cause := fmt.Errorf(format, args...)
err := e
err.cause = cause
err.Cause = cause.Error()
Expand Down

0 comments on commit badb0e7

Please sign in to comment.