Skip to content

Releases: webrpc/gen-golang

v0.13.3

27 Sep 20:24
dd5f914
Compare
Choose a tag to compare
  • Switch to .WithCause() in the generated code
  • Implement err.WithCause(), a shorter version of proto.ErrorWithCause()
  • Deprecate proto.ErrorWithCause()
  • Implement -errorStackTrace opt-in option (errors with stack traces reflect-compatible with github.com/pkg/errors / golang.org/x/xerrors / golang.org/x/exp/errors)
  • Improve formatting
  • Generates less server code
  • Implements Allow header per RFC 9110
  • Implements -fixEmptyArrays option to force empty array [] instead of null in JSON
  • Removes deprecated ioutils pkg
  • Adds support for type meta to service method arguments

v0.13.2

27 Sep 16:23
750a2a0
Compare
Choose a tag to compare
  • Implement err.WithCause(), a shorter version of proto.ErrorWithCause()
  • Deprecate proto.ErrorWithCause()
  • Implement -errorStackTrace opt-in option (errors with stack traces reflect-compatible with github.com/pkg/errors / golang.org/x/xerrors / golang.org/x/exp/errors)
  • Improve formatting

v0.13.1

25 Aug 13:22
c9e212d
Compare
Choose a tag to compare
  • Generates less server code
  • Implements Allow header per RFC 9110
  • Implements -fixEmptyArrays option to force empty array [] instead of null in JSON
  • Removes deprecated ioutils pkg
  • Adds support for type meta to service method arguments

#31
#36
#35
#34
#33
#32
#37

v0.12.5

07 Aug 11:38
fe96a78
Compare
Choose a tag to compare
Fix Enum generated method receiver (#30)

v0.12.4

05 Aug 20:06
Compare
Choose a tag to compare
Try to fix error on webrpc repo

command failed: template: main.go.tmpl:8:32: executing "main" at <eq .Opts.types "false">: error calling eq: incompatible types for comparison

v0.12.3

05 Aug 19:48
34d99ce
Compare
Choose a tag to compare
Simplify Enums from JSONMarshaler to TextMarshaler interface (#29)

* Simplify Enums from JSONMarshaler to TextMarshaler interface

Compared to JSONMarshaler interface, this removes:
1. an extra bytes.NewBufferString() buffer during the marshaling
2. an extra json.Unmarshal() call during the unmarshaling
3. need for "bytes" import in the server-only code

* Regenerate examples

v0.12.2

05 Aug 12:59
dc4839d
Compare
Choose a tag to compare
Implement -types=true|false option (true by default) (#28)

v0.12.1

05 Aug 12:59
b7a68b2
Compare
Choose a tag to compare
Fix server imports & indentation (#25)

v0.12.0

20 Jul 21:55
ecf16d3
Compare
Choose a tag to compare

Implement faster JSON (un)marshaling via jsoniter pkg (#24)

webrpc-gen -schema=proto.ridl -target=golang -client -json=jsoniter -out=client.gen.go

Fixes webrpc/webrpc#20

v0.11.4

20 Jul 14:50
856d281
Compare
Choose a tag to compare
Fix uppercase method input/return arguments in server code too (#23)

Follow up for #22.

This change matches the TypeScript generator:
https://github.com/webrpc/gen-typescript/blob/master/types.go.tmpl#L51-L63

Given the following schema:

  service ExampleService
    - GetUser(UserID: uint64) => (USER: User)

The golang generator wrongly generated "userID" and "uSER" arguments over JSON.