Skip to content

Commit

Permalink
fix proto3 format error
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkuo committed Oct 10, 2023
1 parent b38db93 commit 838c06c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/core/convert/pb/pbitemcreater/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ type List struct {

func (c *List) ItemCreate(table db.Table, service string, filters []convert.ColumnFilter) (protocol.Item, error) {
req := factory.NewMessage(consts.ProtoBuf, fmt.Sprintf("%sListReq", tools.UpperCamelCase(table.Name())))
err := req.AddField(pb.NewField("page", "int", 1, "", false))
err := req.AddField(pb.NewField("page", "int32", 1, "", false))
if err != nil {
return nil, err
}
err = req.AddField(pb.NewField("pageSize", "int", 2, "", false))
err = req.AddField(pb.NewField("pageSize", "int32", 2, "", false))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/protocol/pb/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ func NewItem(name string, comment string, service string, request protocol.Messa
}

func (i *Item) String(indent int) string {
return fmt.Sprintf("%srpc %s(%s) returns (%s)", tools.Blank(indent), i.Name(), i.Request().Name(), i.Response().Name())
return fmt.Sprintf("%srpc %s(%s) returns (%s);", tools.Blank(indent), i.Name(), i.Request().Name(), i.Response().Name())
}

0 comments on commit 838c06c

Please sign in to comment.