This commit is contained in:
yoan
2024-08-21 12:19:12 +08:00
commit 50fa238d88
89 changed files with 11835 additions and 0 deletions

19
internal/utils/app/app.go Normal file
View File

@@ -0,0 +1,19 @@
package app
import (
"sync"
"github.com/pocketbase/pocketbase"
)
var instance *pocketbase.PocketBase
var intanceOnce sync.Once
func GetApp() *pocketbase.PocketBase {
intanceOnce.Do(func() {
instance = pocketbase.New()
})
return instance
}