mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-28 14:50:29 +08:00
finish 解析
This commit is contained in:
@@ -25,7 +25,7 @@ type List struct {
|
||||
QuesC int // QuesC 总小题数
|
||||
HasntAnalyzed bool // HasntAnalyzed whether file has been analyzed
|
||||
IsTemp bool // IsTemp whether file is temp
|
||||
Path string `db:"Path,UNIQUE"` // Path of file, unique
|
||||
Path string // Path of file, normally unique
|
||||
Desc string // Desc is file's description
|
||||
}
|
||||
|
||||
@@ -89,3 +89,10 @@ func (f *FileDatabase) ListUploadedFile() (lst []*List, err error) {
|
||||
FileDB.mu.RUnlock()
|
||||
return
|
||||
}
|
||||
|
||||
func (f *FileDatabase) GetFileInfo(id int) (lst List, err error) {
|
||||
FileDB.mu.RLock()
|
||||
lst, err = sql.Find[List](&FileDB.db, FileTableList, "WHERE ID="+strconv.Itoa(id))
|
||||
FileDB.mu.RUnlock()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user