mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-24 15:00:25 +02:00
[#1267] call app.Bootstrap() before cobra commands execution
This commit is contained in:
1 parent
8e582acbee
commit
c25e67e13d
6 files changed
+189
-20
No files matched your search
+9
-1
@@ -267,8 +267,16 @@ func NewBaseApp(config *BaseAppConfig) *BaseApp {
|
||||
return app
|
||||
}
|
||||
|
||||
// IsBootstrapped checks if the application was initialized
|
||||
// (aka. whether Bootstrap() was called).
|
||||
func (app *BaseApp) IsBootstrapped() bool {
|
||||
return app.dao != nil && app.logsDao != nil && app.settings != nil
|
||||
}
|
||||
|
||||
// Bootstrap initializes the application
|
||||
// (aka. create data dir, open db connections, load settings, etc.)
|
||||
// (aka. create data dir, open db connections, load settings, etc.).
|
||||
//
|
||||
// It will call ResetBootstrapState() if the application was already bootstrapped.
|
||||
func (app *BaseApp) Bootstrap() error {
|
||||
event := &BootstrapEvent{app}
|
||||
|
||||
|
||||
Reference in new issue
Block a user