This commit is contained in:
a 2024-03-26 16:18:01 -05:00
parent c2842a54ba
commit 32b8835013
Signed by: a
GPG Key ID: 374BC539FE795AF0
1 changed files with 7 additions and 5 deletions

View File

@ -1,9 +1,9 @@
package {{Package}} package {{Package}}
import ( import (
"log/slog" "log/slog"
"go.uber.org/fx" "go.uber.org/fx"
) )
type {{title Package}} struct { type {{title Package}} struct {
@ -11,20 +11,22 @@ type {{title Package}} struct {
} }
type Params struct { type Params struct {
fx.In fx.In
Lc fx.Lifecycle
Log *slog.Logger Log *slog.Logger
} }
type Result struct { type Result struct {
fx.Out fx.Out
Output *{{title Package}} Output *{{title Package}}
} }
func New(p Params) (r Result, err error) { func New(p Params) (r Result, err error) {
o := &{{title Package}}{} o := &{{title Package}}{}
o.log = p.Log o.log = p.Log
r.Output = o r.Output = o
return return
} }