Releases: webrpc/gen-golang
Releases · webrpc/gen-golang
v0.10.0: Interoperability tests
- Tested with [email protected] ✅
- Implemented interoperability tests https://github.com/webrpc/gen-golang/tree/master/tests
v0.9.0: Update to [email protected]
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`
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
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
Fixes webrpc/webrpc#135
Example:
- Given this RIDL
message User
- ID: uint64
+ go.tag.db = id
- 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
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
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).