[#496] node: Fix linter importas

Standardize the alias of the
import frostfs-sdk-go/object as objectSDK.

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2023-07-06 15:36:41 +03:00
parent 4bbe9cc936
commit 033eaf77e1
80 changed files with 444 additions and 443 deletions

View file

@ -6,7 +6,7 @@ import (
"fmt"
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
"go.etcd.io/bbolt"
)
@ -120,7 +120,7 @@ const (
addressKeySize = cidSize + objectKeySize
)
var splitInfoError *object.SplitInfoError // for errors.As comparisons
var splitInfoError *objectSDK.SplitInfoError // for errors.As comparisons
func bucketName(cnr cid.ID, prefix byte, key []byte) []byte {
key[0] = prefix
@ -221,7 +221,7 @@ func objectKey(obj oid.ID, key []byte) []byte {
// if meets irregular object container in objs - returns its type, otherwise returns object.TypeRegular.
//
// firstIrregularObjectType(tx, cnr, obj) usage allows getting object type.
func firstIrregularObjectType(tx *bbolt.Tx, idCnr cid.ID, objs ...[]byte) object.Type {
func firstIrregularObjectType(tx *bbolt.Tx, idCnr cid.ID, objs ...[]byte) objectSDK.Type {
if len(objs) == 0 {
panic("empty object list in firstIrregularObjectType")
}
@ -229,11 +229,11 @@ func firstIrregularObjectType(tx *bbolt.Tx, idCnr cid.ID, objs ...[]byte) object
var keys [2][1 + cidSize]byte
irregularTypeBuckets := [...]struct {
typ object.Type
typ objectSDK.Type
name []byte
}{
{object.TypeTombstone, tombstoneBucketName(idCnr, keys[0][:])},
{object.TypeLock, bucketNameLockers(idCnr, keys[1][:])},
{objectSDK.TypeTombstone, tombstoneBucketName(idCnr, keys[0][:])},
{objectSDK.TypeLock, bucketNameLockers(idCnr, keys[1][:])},
}
for i := range objs {
@ -244,7 +244,7 @@ func firstIrregularObjectType(tx *bbolt.Tx, idCnr cid.ID, objs ...[]byte) object
}
}
return object.TypeRegular
return objectSDK.TypeRegular
}
// return true if provided object is of LOCK type.