forked from TrueCloudLab/frostfs-node
[#772] node: Apply gofumpt
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
00aa6d9749
commit
79088baa06
136 changed files with 293 additions and 239 deletions
|
@ -22,7 +22,8 @@ func NodeInfoFromRawNetmapElement(dst *NodeInfo, info interface {
|
|||
IterateAddresses(func(string) bool)
|
||||
NumberOfAddresses() int
|
||||
ExternalAddresses() []string
|
||||
}) error {
|
||||
},
|
||||
) error {
|
||||
var a network.AddressGroup
|
||||
|
||||
err := a.FromIterator(info)
|
||||
|
@ -49,7 +50,8 @@ func NodeInfoFromNetmapElement(dst *NodeInfo, info interface {
|
|||
PublicKey() []byte
|
||||
Addresses() network.AddressGroup
|
||||
ExternalAddresses() network.AddressGroup
|
||||
}) {
|
||||
},
|
||||
) {
|
||||
nodeInfoFromKeyAddr(dst, info.PublicKey(), info.Addresses(), info.ExternalAddresses())
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ func (c SenderClassifier) Classify(
|
|||
ownerID *user.ID,
|
||||
ownerKey *keys.PublicKey,
|
||||
idCnr cid.ID,
|
||||
cnr container.Container) (res *ClassifyResult, err error) {
|
||||
cnr container.Container,
|
||||
) (res *ClassifyResult, err error) {
|
||||
ownerKeyInBytes := ownerKey.Bytes()
|
||||
|
||||
// TODO: #767 get owner from frostfs.id if present
|
||||
|
@ -114,7 +115,8 @@ func (c SenderClassifier) isInnerRingKey(owner []byte) (bool, error) {
|
|||
|
||||
func (c SenderClassifier) isContainerKey(
|
||||
owner, idCnr []byte,
|
||||
cnr container.Container) (bool, error) {
|
||||
cnr container.Container,
|
||||
) (bool, error) {
|
||||
nm, err := core.GetLatestNetworkMap(c.netmap) // first check current netmap
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
@ -140,7 +142,8 @@ func (c SenderClassifier) isContainerKey(
|
|||
func lookupKeyInContainer(
|
||||
nm *netmap.NetMap,
|
||||
owner, idCnr []byte,
|
||||
cnr container.Container) (bool, error) {
|
||||
cnr container.Container,
|
||||
) (bool, error) {
|
||||
cnrVectors, err := nm.ContainerNodes(cnr.PlacementPolicy(), idCnr)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue