diff --git a/internal/static/usecase.go b/internal/static/usecase.go index 9eb623d..80c7b1f 100644 --- a/internal/static/usecase.go +++ b/internal/static/usecase.go @@ -7,5 +7,6 @@ import ( ) type UseCase interface { + // Do search static on path and returns Static domain if exist. Do(ctx context.Context, path string) (*domain.Static, error) } diff --git a/internal/static/usecase/static_ucase.go b/internal/static/usecase/static_ucase.go index e663e75..68c8ff6 100644 --- a/internal/static/usecase/static_ucase.go +++ b/internal/static/usecase/static_ucase.go @@ -11,19 +11,19 @@ import ( ) type staticUseCase struct { - statics static.Repository + store static.Repository } -func NewStaticUseCase(statics static.Repository) static.UseCase { +func NewStaticUseCase(store static.Repository) static.UseCase { return &staticUseCase{ - statics: statics, + store: store, } } func (ucase *staticUseCase) Do(ctx context.Context, p string) (*domain.Static, error) { p = strings.TrimPrefix(path.Clean(p), "/") - s, err := ucase.statics.Get(ctx, p) + s, err := ucase.store.Get(ctx, p) if err != nil { return nil, fmt.Errorf("cannot get static file: %w", err) }