svc.tpl 240 B

1234567891011121314151617
  1. package svc
  2. import (
  3. {{.configImport}}
  4. )
  5. type ServiceContext struct {
  6. Config {{.config}}
  7. {{.middleware}}
  8. }
  9. func NewServiceContext(c {{.config}}) *ServiceContext {
  10. return &ServiceContext{
  11. Config: c,
  12. {{.middlewareAssignment}}
  13. }
  14. }