Довёл fix20: firewall-mode, staged state, diagnostics, readiness и build-gate
This commit is contained in:
@@ -226,6 +226,20 @@ func CloseSqliteDB() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func IsSqliteReady() bool {
|
||||
if sqliteDB == nil {
|
||||
return false
|
||||
}
|
||||
db, err := sqliteDB.DB()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if err := db.Ping(); err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func Paginate(pageNum *int64, pageSize *int64) func(db *gorm.DB) *gorm.DB {
|
||||
var num int64 = 1
|
||||
var size int64 = 10
|
||||
|
||||
Reference in New Issue
Block a user