diff --git a/example/blog/blog.yaml b/example/blog/blog.yaml index ee2ec7bd..49d7c3cb 100644 --- a/example/blog/blog.yaml +++ b/example/blog/blog.yaml @@ -21,6 +21,7 @@ Blog: comment: blog Category: + package: "cate" fields: - Cid: int64 - Name: string diff --git a/example/blog/gen_Category_struct.go b/example/blog/gen_Category_struct.go index 788603e8..3d887cbc 100644 --- a/example/blog/gen_Category_struct.go +++ b/example/blog/gen_Category_struct.go @@ -12,7 +12,7 @@ type Category struct { const () func (p *Category) GetNameSpace() string { - return "blog" + return "cate" } func (p *Category) GetClassName() string { diff --git a/parser/obj.go b/parser/obj.go index 9d98aa95..3c435f9a 100644 --- a/parser/obj.go +++ b/parser/obj.go @@ -493,6 +493,8 @@ func (o *Obj) Read(data map[string]interface{}) error { } case "comment": o.Comment = val.(string) + case "package": + o.Package = val.(string) default: return errors.New(o.Name + " has invalid obj property: " + key) }