We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea15206 commit ac1ff0aCopy full SHA for ac1ff0a
1 file changed
internal/bootstrap/app_bootstrap.go
@@ -19,6 +19,7 @@ import (
19
"time"
20
21
"github.com/gin-gonic/gin"
22
+
23
"github.com/tinyauthapp/tinyauth/internal/model"
24
"github.com/tinyauthapp/tinyauth/internal/repository"
25
"github.com/tinyauthapp/tinyauth/internal/service"
@@ -173,7 +174,9 @@ func (app *BootstrapApp) Setup() error {
173
174
defer func() {
175
app.cancel()
176
app.wg.Wait()
- app.db.Close()
177
+ if app.db != nil {
178
+ app.db.Close()
179
+ }
180
}()
181
182
// store
0 commit comments