MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Exist

Method Exist

utils/lock.go:14–19  ·  view source on GitHub ↗

查询是否存在

(bookId int)

Source from the content-addressed store, hash-verified

12
13//查询是否存在
14func (this BooksLock) Exist(bookId int) (exist bool) {
15 this.Lock.RLock()
16 defer this.Lock.RUnlock()
17 _, exist = this.Books[bookId]
18 return
19}
20
21//设置
22func (this BooksLock) Set(bookId int) {

Callers 2

ReadMethod · 0.45
ReadMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected