Chore: Deprecate ID from Folder (#78281)
* Chore: Deprecate ID from Folder * chore: add more linter comments * chore: add missing lint comment
This commit is contained in:
@@ -26,6 +26,7 @@ const (
|
||||
var ErrFolderNotFound = errutil.NotFound("folder.notFound")
|
||||
|
||||
type Folder struct {
|
||||
// Deprecated: use UID instead
|
||||
ID int64 `xorm:"pk autoincr 'id'"`
|
||||
OrgID int64 `xorm:"org_id"`
|
||||
UID string `xorm:"uid"`
|
||||
@@ -48,6 +49,7 @@ type Folder struct {
|
||||
var GeneralFolder = Folder{ID: 0, Title: "General"}
|
||||
|
||||
func (f *Folder) IsGeneral() bool {
|
||||
// nolint:staticcheck
|
||||
return f.ID == GeneralFolder.ID && f.Title == GeneralFolder.Title
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user