🎨 Format static use case method code
This commit is contained in:
parent
a52f83378b
commit
8e84569af8
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue