feat: add new module cmd
This commit is contained in:
16
templates/module/controller.go.tpl
Normal file
16
templates/module/controller.go.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
package {{.ModuleName}}
|
||||
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// @provider
|
||||
type Controller struct {
|
||||
svc *Service
|
||||
log *log.Entry `inject:"false"`
|
||||
}
|
||||
|
||||
func (c *Controller) Prepare() error {
|
||||
c.log = log.WithField("module", "{{.ModuleName}}.Controller")
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user