🎨 Format static use case method code

This commit is contained in:
Maxim Lebedev 2024-02-14 21:24:42 +06:00
parent a52f83378b
commit 8e84569af8
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 1 additions and 3 deletions

View File

@ -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)
}