mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 18:00:24 +08:00
18 lines
240 B
Smarty
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}}
|
||
|
}
|
||
|
}
|