Alex Vanin
20de74a505
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
23 lines
402 B
Go
23 lines
402 B
Go
package object
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
|
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
|
)
|
|
|
|
// AddressOf returns the address of the object.
|
|
func AddressOf(obj *object.Object) oid.Address {
|
|
var addr oid.Address
|
|
|
|
id, ok := obj.ID()
|
|
if ok {
|
|
addr.SetObject(id)
|
|
}
|
|
|
|
cnr, ok := obj.ContainerID()
|
|
if ok {
|
|
addr.SetContainer(cnr)
|
|
}
|
|
|
|
return addr
|
|
}
|