diff --git a/gen/pbscheme/gen_dir.go b/gen/pbscheme/gen_dir.go index 8aa486a..1efc5d1 100644 --- a/gen/pbscheme/gen_dir.go +++ b/gen/pbscheme/gen_dir.go @@ -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}}; diff --git a/gen/pbscheme/gen_proto.go b/gen/pbscheme/gen_proto.go index ec61361..49df3d0 100644 --- a/gen/pbscheme/gen_proto.go +++ b/gen/pbscheme/gen_proto.go @@ -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}}; diff --git a/gen/ppgo/text.go b/gen/ppgo/text.go index 2d6ceb9..046dad7 100644 --- a/gen/ppgo/text.go +++ b/gen/ppgo/text.go @@ -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}} } `