Skip to content

Commit 10e3870

Browse files
lvan100lianghuan
authored andcommitted
111
1 parent 0a1688a commit 10e3870

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

gen/generator/golang/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ func convertType(ctx Context, t tidl.Type) (Type, error) {
436436

437437
if t.OneOf {
438438
r.Fields = append(r.Fields, TypeField{
439-
Type: r.Name + "Type",
439+
Type: r.Name + "TypeAsString",
440440
TypeKind: TypeKindEnumType,
441441
Name: "FieldType",
442442
Tag: "`json:\"field_type\"`",

gen/testdata/manager/go/manager_http_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (m *MyManagerServer) Stream(ctx context.Context, req *proto.StreamReq, resp
4444
resp <- &proto.StreamResp{
4545
Id: strconv.Itoa(i),
4646
Payload: proto.Payload{
47-
FieldType: proto.PayloadType_TextData,
47+
FieldType: proto.PayloadTypeAsString(proto.PayloadType_text_data),
4848
TextData: "123",
4949
},
5050
}

gen/testdata/manager/go/proto/stream.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)