|
@@ -55,7 +55,10 @@ func newApp(ctx context.Context, logger log.Logger, r *registry.Registry, hs *ht
|
|
|
if r != nil {
|
|
if r != nil {
|
|
|
opts = append(opts, kratos.Registrar(r))
|
|
opts = append(opts, kratos.Registrar(r))
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ err := postInitService()
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ panic(err)
|
|
|
|
|
+ }
|
|
|
return kratos.New(
|
|
return kratos.New(
|
|
|
opts...,
|
|
opts...,
|
|
|
)
|
|
)
|
|
@@ -114,10 +117,6 @@ func main() {
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
panic(err)
|
|
panic(err)
|
|
|
}
|
|
}
|
|
|
- err = postInitService()
|
|
|
|
|
- if err != nil {
|
|
|
|
|
- panic(err)
|
|
|
|
|
- }
|
|
|
|
|
// start and wait for stop signal
|
|
// start and wait for stop signal
|
|
|
if err = app.Run(); err != nil {
|
|
if err = app.Run(); err != nil {
|
|
|
panic(err)
|
|
panic(err)
|