1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-21 12:44:49 -05:00

Lint models/admin.go

This commit is contained in:
Bwko 2016-11-24 21:54:00 +01:00
parent 21e8deed89
commit d8e11a8eaa

View file

@ -18,9 +18,11 @@ import (
"code.gitea.io/gitea/modules/setting"
)
//NoticeType describes the notice type
type NoticeType int
const (
//NoticeRepository type
NoticeRepository NoticeType = iota + 1
)
@ -33,10 +35,12 @@ type Notice struct {
CreatedUnix int64
}
// BeforeInsert is invoked from XORM before inserting an object of this type.
func (n *Notice) BeforeInsert() {
n.CreatedUnix = time.Now().Unix()
}
// AfterSet is invoked from XORM after setting the value of a field of this object.
func (n *Notice) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "created_unix":