Skip to content

Commit 574e49c

Browse files
authored
Merge pull request #241 from Bwko/lint/admin.go
Lint models/admin.go
2 parents 21b7d30 + d8e11a8 commit 574e49c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: models/admin.go

+4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ import (
1818
"code.gitea.io/gitea/modules/setting"
1919
)
2020

21+
//NoticeType describes the notice type
2122
type NoticeType int
2223

2324
const (
25+
//NoticeRepository type
2426
NoticeRepository NoticeType = iota + 1
2527
)
2628

@@ -33,10 +35,12 @@ type Notice struct {
3335
CreatedUnix int64
3436
}
3537

38+
// BeforeInsert is invoked from XORM before inserting an object of this type.
3639
func (n *Notice) BeforeInsert() {
3740
n.CreatedUnix = time.Now().Unix()
3841
}
3942

43+
// AfterSet is invoked from XORM after setting the value of a field of this object.
4044
func (n *Notice) AfterSet(colName string, _ xorm.Cell) {
4145
switch colName {
4246
case "created_unix":

0 commit comments

Comments
 (0)