From a5a88222a6609b50d756d97e5fa122ed08b672a0 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 16 Dec 2019 22:51:17 +0800 Subject: [PATCH] gofmt --- .../frame/mvc/app/model/article/article.go | 2 +- .../mvc/app/model/article/article_entity.go | 28 +++++++++---------- .../mvc/app/model/article/article_model.go | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.example/frame/mvc/app/model/article/article.go b/.example/frame/mvc/app/model/article/article.go index ea00311c4..bc10c7d4b 100644 --- a/.example/frame/mvc/app/model/article/article.go +++ b/.example/frame/mvc/app/model/article/article.go @@ -1,3 +1,3 @@ package article -// Fill with you ideas below. \ No newline at end of file +// Fill with you ideas below. diff --git a/.example/frame/mvc/app/model/article/article_entity.go b/.example/frame/mvc/app/model/article/article_entity.go index 94bb8f876..cc0bcd1bd 100644 --- a/.example/frame/mvc/app/model/article/article_entity.go +++ b/.example/frame/mvc/app/model/article/article_entity.go @@ -12,19 +12,19 @@ import ( // Entity is the golang structure for table gf_article. type Entity struct { - Id int `orm:"id,primary" json:"id"` // - CatId int `orm:"cat_id" json:"cat_id"` // 分类ID - Uid int `orm:"uid" json:"uid"` // 用户ID - Title string `orm:"title" json:"title"` // 标题 - Content string `orm:"content" json:"content"` // 内容 - Order int `orm:"order" json:"order"` // 排序 - Brief string `orm:"brief" json:"brief"` // 摘要 - Thumb string `orm:"thumb" json:"thumb"` // 缩略图 - Tags string `orm:"tags" json:"tags"` // 标签 - Referer string `orm:"referer" json:"referer"` // 内容来源 - Status int `orm:"status" json:"status"` // 状态\n0: 禁用\n1: 正常 - CreateTime *gtime.Time `orm:"create_time" json:"create_time"` // 创建时间 - UpdateTime *gtime.Time `orm:"update_time" json:"update_time"` // 修改时间 + Id int `orm:"id,primary" json:"id"` // + CatId int `orm:"cat_id" json:"cat_id"` // 分类ID + Uid int `orm:"uid" json:"uid"` // 用户ID + Title string `orm:"title" json:"title"` // 标题 + Content string `orm:"content" json:"content"` // 内容 + Order int `orm:"order" json:"order"` // 排序 + Brief string `orm:"brief" json:"brief"` // 摘要 + Thumb string `orm:"thumb" json:"thumb"` // 缩略图 + Tags string `orm:"tags" json:"tags"` // 标签 + Referer string `orm:"referer" json:"referer"` // 内容来源 + Status int `orm:"status" json:"status"` // 状态\n0: 禁用\n1: 正常 + CreateTime *gtime.Time `orm:"create_time" json:"create_time"` // 创建时间 + UpdateTime *gtime.Time `orm:"update_time" json:"update_time"` // 修改时间 } // Article is alias of Entity, which some developers say they just want. @@ -65,4 +65,4 @@ func (r *Entity) Update() (result sql.Result, err error) { // Delete does "DELETE FROM...WHERE..." statement for deleting current object from table. func (r *Entity) Delete() (result sql.Result, err error) { return Model.Where(gdb.GetWhereConditionOfStruct(r)).Delete() -} \ No newline at end of file +} diff --git a/.example/frame/mvc/app/model/article/article_model.go b/.example/frame/mvc/app/model/article/article_model.go index 90561ed3e..b0ab9dea9 100644 --- a/.example/frame/mvc/app/model/article/article_model.go +++ b/.example/frame/mvc/app/model/article/article_model.go @@ -325,4 +325,4 @@ func (m *arModel) Chunk(limit int, callback func(entities []*Entity, err error) } return callback(entities, err) }) -} \ No newline at end of file +}