From 32b883501319328fcbc58f34072393d544d09a4e Mon Sep 17 00:00:00 2001 From: a Date: Tue, 26 Mar 2024 16:18:01 -0500 Subject: [PATCH] done --- .config/boilr/templates/fx/template/component.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.config/boilr/templates/fx/template/component.go b/.config/boilr/templates/fx/template/component.go index 4fcff7c..62ad086 100644 --- a/.config/boilr/templates/fx/template/component.go +++ b/.config/boilr/templates/fx/template/component.go @@ -1,9 +1,9 @@ package {{Package}} import ( - "log/slog" + "log/slog" - "go.uber.org/fx" + "go.uber.org/fx" ) type {{title Package}} struct { @@ -11,20 +11,22 @@ type {{title Package}} struct { } type Params struct { - fx.In + fx.In + Lc fx.Lifecycle Log *slog.Logger } type Result struct { - fx.Out + fx.Out - Output *{{title Package}} + Output *{{title Package}} } func New(p Params) (r Result, err error) { o := &{{title Package}}{} o.log = p.Log + r.Output = o return }