add shutdown

This commit is contained in:
YouROK
2020-11-19 10:26:29 +03:00
parent 469c145938
commit c9b2e0938d
5 changed files with 73 additions and 41 deletions

View File

@@ -14,3 +14,10 @@ func InitSets(path string, readOnly bool) {
func CloseDB() {
tdb.CloseDB()
}
func IsReadOnly() bool {
if tdb == nil || tdb.ReadOnly {
return true
}
return false
}