Skip to content

Commit

Permalink
pb输出包与package统一
Browse files Browse the repository at this point in the history
  • Loading branch information
davyxu committed Jun 15, 2021
1 parent 35cbd47 commit 84c736c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gen/pbscheme/gen_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const protoDirCodeTemplate = `// Generated by github.com/davyxu/protoplus
// DO NOT EDIT!
syntax = "proto3";
option go_package= "./;proto";
option go_package= "./;{{.PackageName}}";
package {{.PackageName}};
Expand Down
2 changes: 1 addition & 1 deletion gen/pbscheme/gen_proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const protoCodeTemplate = `// Generated by github.com/davyxu/protoplus
// DO NOT EDIT!
syntax = "proto3";
option go_package= ".;proto";
option go_package= "./;{{.PackageName}}";
package {{.PackageName}};
Expand Down
5 changes: 3 additions & 2 deletions gen/ppgo/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ var (
func init() {
{{range .Structs}}
cellmeta.Register(&cellmeta.Meta{
Codec: cellcodec.MustGetByName("{{StructCodec .}}"),
Type: reflect.TypeOf((*{{.Name}})(nil)).Elem(),
FullName: "{{$.PackageName}}.{{.Name}}",
ID: {{StructMsgID .}},
New: func() interface{} { return &{{.Name}}{} },
Type: reflect.TypeOf((*{{.Name}})(nil)).Elem(),
Codec: cellcodec.MustGetByName("{{StructCodec .}}"),
}) {{end}}
}
`

0 comments on commit 84c736c

Please sign in to comment.