go-zero/tools/goctl/api/gogen/svc.tpl
2022-04-04 13:12:05 +08:00

18 lines
240 B
Smarty

package svc
import (
{{.configImport}}
)
type ServiceContext struct {
Config {{.config}}
{{.middleware}}
}
func NewServiceContext(c {{.config}}) *ServiceContext {
return &ServiceContext{
Config: c,
{{.middlewareAssignment}}
}
}