Skip to content

Releases: webrpc/gen-golang

v0.10.0: Interoperability tests

02 Jan 16:17
152a8f2
Compare
Choose a tag to compare

v0.9.0: Update to [email protected]

28 Dec 18:43
41cd528
Compare
Choose a tag to compare
Update templates to [email protected] schema (#13)

* Require [email protected]

* Update templates to [email protected] JSON schema

* Improve the templates

* Test against https://github.com/webrpc/webrpc/pull/171

* Migrate examples to [email protected]

find . -name '*.ridl' -exec sed -i -e 's/^message /struct /g' {} \;

* Fix template codegen

* Regenerate examples

* Examples: Use local templates

v0.8.1: Fixes bug with `go.tag.json`

29 Nov 11:14
9e0555e
Compare
Choose a tag to compare

Tested with [email protected] ✅ .

Fixes bug with go.tag.json, which rendered duplicated json tags:

-   CreatedAt *time.Time `json:"createdAt" db:"created_at,omitempty" json:"createdAt,omitempty"`
+   UpdatedAt *time.Time `json:"updatedAt,omitempty" db:"updated_at,omitempty"`

v0.8.0: Fixes custom struct tags

25 Nov 14:53
413586e
Compare
Choose a tag to compare

Requires at least [email protected] (new array/sort/append template functions) ✅

This RIDL

message User
  - id: uint64
    + go.tag.db = id,omitempty
    + go.tag.cbor = id,omitempty

now correctly generates

 type User struct {
-  ID  uint64  `json:"id" db:"id,omitempty"`
+  ID  uint64  `json:"id" db:"id,omitempty" cbor:"id,omitempty"`
 }

v0.7.5: Fixes regression in JSON struct field name

19 Nov 13:26
Compare
Choose a tag to compare

Fixes webrpc/webrpc#135

Example:

  1. Given this RIDL
 message User
  - ID: uint64
       + go.tag.db = id
  1. the generated code will result in
 type Nickname struct {
-   ID        uint64     `json:"iD" db:"id"`
+   ID        uint64     `json:"ID" db:"id"`
 }

v0.7.4: Fix methods with no response value

14 Nov 21:23
Compare
Choose a tag to compare

Methods with no response value now render empty JSON object {}.

# RIDL

service ExampleService
  - Ping()
@ func (s *exampleServiceServer) servePingJSON(ctx context.Context, w http.ResponseWriter, r *http.Request) {

    w.Header().Set("Content-Type", "application/json")
    w.WriteHeader(http.StatusOK)
+   w.Write([]byte("{}"))
 }

Fixes webrpc/webrpc#74
Fixes webrpc/webrpc#104
Fixes webrpc/webrpc#105

v0.7.3: Standalone Golang generator templates

14 Nov 18:23
Compare
Choose a tag to compare

Tested with webrpc-gen v0.7.0. ✅

This version of Golang generator spits out generated code that is fully backward-compatible with webrpc-gen v0.6.0.

Previous versions (v0.7.0, v0.7.1, v0.7.2) had few minor bugs with go.field.type meta support (rendered some extra pointers incorrectly).