Skip to content

Commit

Permalink
fix: xtest
Browse files Browse the repository at this point in the history
  • Loading branch information
2637309949 committed Aug 9, 2021
1 parent e3d2bcf commit ad24bdd
Show file tree
Hide file tree
Showing 8 changed files with 294 additions and 161 deletions.
11 changes: 8 additions & 3 deletions cmd/dolphin/template/assets/app.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

package {{$.Viper.GetString "dir.api" }}

import (
import (
"context"
"sync"

"{{.PackageName}}/{{$.Viper.GetString "dir.svc" }}"
Expand Down Expand Up @@ -52,7 +53,7 @@ func (dol *Dolphin) Reflesh() error {
dol.SyncSrv({{$.Viper.GetString "dir.svc" }}.NewSvcHepler({{$.Viper.GetString "dir.api" }}.RedisClient))
dol.SyncService()
dol.SyncController()
return nil
return dol.Dolphin.Reflesh()
}

// Run defined TODO
Expand All @@ -61,7 +62,11 @@ func (dol *Dolphin) Run() error {
logrus.Errorln(err)
return err
}
return dol.Dolphin.Run()
if err := dol.LifeCycle(context.Background()); err != nil {
logrus.Errorln(err)
return err
}
return nil
}

// Use defined TODO
Expand Down
6 changes: 3 additions & 3 deletions cmd/dolphin/template/dist/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions examples/scene/api/app.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ad24bdd

Please sign in to comment.