context.tpl 306 B

1234567891011121314151617181920
  1. // Code scaffolded by goctl. Safe to edit.
  2. // goctl {{.version}}
  3. package svc
  4. import (
  5. {{.configImport}}
  6. )
  7. type ServiceContext struct {
  8. Config {{.config}}
  9. {{.middleware}}
  10. }
  11. func NewServiceContext(c {{.config}}) *ServiceContext {
  12. return &ServiceContext{
  13. Config: c,
  14. {{.middlewareAssignment}}
  15. }
  16. }