zero-ppanel/goctl_tpl/api/context.tpl

21 lines
306 B
Smarty

// Code scaffolded by goctl. Safe to edit.
// goctl {{.version}}
package svc
import (
{{.configImport}}
)
type ServiceContext struct {
Config {{.config}}
{{.middleware}}
}
func NewServiceContext(c {{.config}}) *ServiceContext {
return &ServiceContext{
Config: c,
{{.middlewareAssignment}}
}
}