7ccd1625af
Remove `Object` and `RawObject` types from `pkg/core/object` package. Use `Object` type from NeoFS SDK Go library everywhere. Avoid using the deprecated elements. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
19 lines
390 B
Go
19 lines
390 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 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
|
|
}
|