frostfs-node/pkg/core/object/object.go
Elizaveta Chichindaeva cc7a723d77 [#1320] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-11 10:40:02 +03:00

19 lines
394 B
Go

package object
import (
"github.com/nspcc-dev/neofs-sdk-go/object"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
)
// AddressOf returns the address of the object.
func AddressOf(obj *object.Object) *addressSDK.Address {
if obj != nil {
addr := addressSDK.NewAddress()
addr.SetObjectID(obj.ID())
addr.SetContainerID(obj.ContainerID())
return addr
}
return nil
}