refactor(service): use service as struct instead of interface

This commit is contained in:
Guz
2025-03-12 10:04:43 -03:00
parent 3d346ca5fe
commit 4ee46e2dc8
2 changed files with 7 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ import (
)
type router struct {
service service.Service
service *service.Service
templates *template.Template
staticFiles fs.FS
@@ -43,6 +43,8 @@ func New(cfg Config) (http.Handler, error) {
}
r := &router{
service: cfg.Service,
templates: cfg.Templates,
staticFiles: cfg.StaticFiles,
@@ -55,7 +57,7 @@ func New(cfg Config) (http.Handler, error) {
}
type Config struct {
Service service.Service
Service *service.Service
Templates *template.Template
StaticFiles fs.FS