1
0
Fork 0

feat: add postgres repository for training

This commit is contained in:
Vojtěch Mareš 2024-06-23 10:35:38 +02:00
parent 8c277ef692
commit ff7e320481
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
19 changed files with 1277 additions and 414 deletions

View file

@ -0,0 +1,23 @@
package bootstrap
import (
"go.uber.org/zap"
"os"
)
func Logger() *zap.Logger {
if os.Getenv("APP_ENV") == "development" {
logger, err := zap.NewDevelopment()
if err != nil {
return zap.NewNop()
}
return logger
}
logger, err := zap.NewProduction()
if err != nil {
return zap.NewNop()
}
return logger
}