forked from TrueCloudLab/frostfs-node
[#1238] Adopt neofs-cli for non pointer slices in SDK
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
8ae869b95e
commit
7f3195b197
11 changed files with 55 additions and 78 deletions
|
@ -180,14 +180,10 @@ func (v *FormatValidator) ValidateContent(o *object.Object) error {
|
|||
idList := tombstone.Members()
|
||||
addrList := make([]*addressSDK.Address, 0, len(idList))
|
||||
|
||||
for _, id := range idList {
|
||||
if id == nil {
|
||||
return fmt.Errorf("(%T) empty member in tombstone", v)
|
||||
}
|
||||
|
||||
for i := range idList {
|
||||
a := addressSDK.NewAddress()
|
||||
a.SetContainerID(cid)
|
||||
a.SetObjectID(id)
|
||||
a.SetObjectID(&idList[i])
|
||||
|
||||
addrList = append(addrList, a)
|
||||
}
|
||||
|
@ -208,12 +204,6 @@ func (v *FormatValidator) ValidateContent(o *object.Object) error {
|
|||
if err := sg.Unmarshal(o.Payload()); err != nil {
|
||||
return fmt.Errorf("(%T) could not unmarshal SG content: %w", v, err)
|
||||
}
|
||||
|
||||
for _, id := range sg.Members() {
|
||||
if id == nil {
|
||||
return fmt.Errorf("(%T) empty member in SG", v)
|
||||
}
|
||||
}
|
||||
case object.TypeLock:
|
||||
if len(o.Payload()) == 0 {
|
||||
return errors.New("empty payload in lock")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue