builds and runs! not sure if it works, needs testing
This commit is contained in:
@@ -20,19 +20,19 @@ import (
|
||||
|
||||
type DatabaseParams struct {
|
||||
fx.In
|
||||
Logger logger.Logger
|
||||
Config config.Config
|
||||
Logger *logger.Logger
|
||||
Config *config.Config
|
||||
}
|
||||
|
||||
type Database struct {
|
||||
URL string
|
||||
log *zerolog.Logger
|
||||
params DatabaseParams
|
||||
params *DatabaseParams
|
||||
}
|
||||
|
||||
func New(lc fx.Lifecycle, params DatabaseParams) (*Database, error) {
|
||||
s := new(Database)
|
||||
s.params = params
|
||||
s.params = ¶ms
|
||||
s.log = params.Logger.Get()
|
||||
|
||||
s.log.Info().Msg("Database instantiated")
|
||||
|
||||
Reference in New Issue
Block a user