mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-28 04:01:45 +00:00
init
This commit is contained in:
19
internal/utils/app/app.go
Normal file
19
internal/utils/app/app.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user