From 8e84569af8f8605f593e750eef741cb199de1262 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Wed, 14 Feb 2024 21:24:42 +0600 Subject: [PATCH] :art: Format static use case method code --- internal/static/usecase/static_ucase.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/static/usecase/static_ucase.go b/internal/static/usecase/static_ucase.go index 68c8ff6..fa91c4a 100644 --- a/internal/static/usecase/static_ucase.go +++ b/internal/static/usecase/static_ucase.go @@ -21,9 +21,7 @@ func NewStaticUseCase(store static.Repository) static.UseCase { } func (ucase *staticUseCase) Do(ctx context.Context, p string) (*domain.Static, error) { - p = strings.TrimPrefix(path.Clean(p), "/") - - s, err := ucase.store.Get(ctx, p) + s, err := ucase.store.Get(ctx, strings.TrimPrefix(path.Clean(p), "/")) if err != nil { return nil, fmt.Errorf("cannot get static file: %w", err) }