func NewService(debug bool, registry kit.Registry) *Service { return &Service{ debug: debug, registry: registry, defaultBackend: registry.DefaultBackend(), resources: make(map[string]kit.Resource), } }
func (s *Service) SetRegistry(x kit.Registry) { s.registry = x if s.backend == nil && x.DefaultBackend() != nil { s.SetBackend(x.DefaultBackend()) } }