[#294] deletesvc: Drop cast
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-07-10 12:18:56 +03:00 committed by Evgenii Stratonikov
parent c83e7c875f
commit 24eb988897
2 changed files with 15 additions and 9 deletions

View file

@ -72,9 +72,9 @@ func New(gs *getsvc.Service,
opts ...Option) *Service { opts ...Option) *Service {
c := &cfg{ c := &cfg{
log: &logger.Logger{Logger: zap.L()}, log: &logger.Logger{Logger: zap.L()},
header: (*headSvcWrapper)(gs), header: &headSvcWrapper{s: gs},
searcher: (*searchSvcWrapper)(ss), searcher: &searchSvcWrapper{s: ss},
placer: (*putSvcWrapper)(ps), placer: &putSvcWrapper{s: ps},
netInfo: ni, netInfo: ni,
keyStorage: ks, keyStorage: ks,
} }

View file

@ -11,11 +11,17 @@ import (
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id" oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
) )
type headSvcWrapper getsvc.Service type headSvcWrapper struct {
s *getsvc.Service
}
type searchSvcWrapper searchsvc.Service type searchSvcWrapper struct {
s *searchsvc.Service
}
type putSvcWrapper putsvc.Service type putSvcWrapper struct {
s *putsvc.Service
}
type simpleIDWriter struct { type simpleIDWriter struct {
ids []oid.ID ids []oid.ID
@ -30,7 +36,7 @@ func (w *headSvcWrapper) headAddress(ctx context.Context, exec *execCtx, addr oi
p.WithRawFlag(true) p.WithRawFlag(true)
p.WithAddress(addr) p.WithAddress(addr)
err := (*getsvc.Service)(w).Head(ctx, p) err := w.s.Head(ctx, p)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -94,7 +100,7 @@ func (w *searchSvcWrapper) splitMembers(ctx context.Context, exec *execCtx) ([]o
p.WithContainerID(exec.containerID()) p.WithContainerID(exec.containerID())
p.WithSearchFilters(fs) p.WithSearchFilters(fs)
err := (*searchsvc.Service)(w).Search(ctx, p) err := w.s.Search(ctx, p)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -109,7 +115,7 @@ func (s *simpleIDWriter) WriteIDs(ids []oid.ID) error {
} }
func (w *putSvcWrapper) put(ctx context.Context, exec *execCtx) (*oid.ID, error) { func (w *putSvcWrapper) put(ctx context.Context, exec *execCtx) (*oid.ID, error) {
streamer, err := (*putsvc.Service)(w).Put() streamer, err := w.s.Put()
if err != nil { if err != nil {
return nil, err return nil, err
} }