[#1454] Upgrade NeoFS SDK Go module with new IDs

Core changes:
 * avoid package-colliding variable naming
 * avoid using pointers to IDs where unnecessary
 * avoid using `idSDK` import alias pattern
 * use `EncodeToString` for protocol string calculation and `String` for
  printing

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-31 20:00:41 +03:00 committed by LeL
parent cc6209e8a0
commit 1c30414a6c
218 changed files with 2095 additions and 2521 deletions

View file

@ -148,7 +148,7 @@ func (p *Streamer) preparePrm(prm *PutInitPrm) error {
}
// get container to store the object
cnr, err := p.cnrSrc.Get(&idCnr)
cnr, err := p.cnrSrc.Get(idCnr)
if err != nil {
return fmt.Errorf("(%T) could not get container by ID: %w", p, err)
}
@ -162,7 +162,7 @@ func (p *Streamer) preparePrm(prm *PutInitPrm) error {
if id, ok := prm.hdr.ID(); ok {
prm.traverseOpts = append(prm.traverseOpts,
// set identifier of the processing object
placement.ForObject(&id),
placement.ForObject(id),
)
}
@ -262,11 +262,13 @@ func (p *Streamer) Close() (*PutResponse, error) {
}
id := ids.ParentID()
if id == nil {
id = ids.SelfID()
if id != nil {
return &PutResponse{
id: *id,
}, nil
}
return &PutResponse{
id: id,
id: ids.SelfID(),
}, nil
}