[#415] *: Go fmt -s
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
fcf1d02afc
commit
1853349f22
9 changed files with 23 additions and 16 deletions
|
@ -24,8 +24,8 @@ const disabledHomomorphicHashingValue = "true"
|
|||
|
||||
// HomomorphicHashingState returns container's homomorphic
|
||||
// hashing state:
|
||||
// * true if hashing is enabled;
|
||||
// * false if hashing is disabled.
|
||||
// - true if hashing is enabled;
|
||||
// - false if hashing is disabled.
|
||||
//
|
||||
// All container's attributes must be unique, otherwise behavior
|
||||
// is undefined.
|
||||
|
|
|
@ -6,8 +6,9 @@ import (
|
|||
)
|
||||
|
||||
// LocalizeFailStatus checks if passed global status.Code is related to container failure and:
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// Arg must not be nil.
|
||||
func LocalizeFailStatus(c *status.Code) bool {
|
||||
|
|
|
@ -59,13 +59,13 @@ func subnetAttributeKey(id *refs.SubnetID) string {
|
|||
// Existing subnet attributes are expected to be key-unique, otherwise undefined behavior.
|
||||
//
|
||||
// Does not add (removes existing) attribute if node:
|
||||
// * disables non-zero subnet;
|
||||
// * enables zero subnet.
|
||||
// - disables non-zero subnet;
|
||||
// - enables zero subnet.
|
||||
//
|
||||
// Attribute key is calculated from ID using format `__NEOFS__SUBNET_%s`.
|
||||
// Attribute Value is:
|
||||
// * `True` if node enters the subnet;
|
||||
// * `False`, otherwise.
|
||||
// - `True` if node enters the subnet;
|
||||
// - `False`, otherwise.
|
||||
func WriteSubnetInfo(node *NodeInfo, info NodeSubnetInfo) {
|
||||
attrs := node.GetAttributes()
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@ import (
|
|||
)
|
||||
|
||||
// LocalizeFailStatus checks if passed global status.Code is related to object failure and:
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// Arg must not be nil.
|
||||
func LocalizeFailStatus(c *status.Code) bool {
|
||||
|
|
|
@ -283,7 +283,7 @@ func (s *SubnetID) ToGRPCMessage() grpc.Message {
|
|||
// FromGRPCMessage restores Info from grpc.Message.
|
||||
//
|
||||
// Supported types:
|
||||
// * refs.SubnetID.
|
||||
// - refs.SubnetID.
|
||||
func (s *SubnetID) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*refs.SubnetID)
|
||||
if !ok {
|
||||
|
|
|
@ -6,8 +6,9 @@ import (
|
|||
)
|
||||
|
||||
// LocalizeFailStatus checks if passed global status.Code is related to session failure and:
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// Arg must not be nil.
|
||||
func LocalizeFailStatus(c *status.Code) bool {
|
||||
|
|
|
@ -51,6 +51,7 @@ type TokenContext interface {
|
|||
}
|
||||
|
||||
// Deprecated: use TokenContext instead.
|
||||
//
|
||||
//nolint:revive
|
||||
type SessionTokenContext = TokenContext
|
||||
|
||||
|
@ -67,6 +68,7 @@ type TokenBody struct {
|
|||
}
|
||||
|
||||
// Deprecated: use TokenBody instead.
|
||||
//
|
||||
//nolint:revive
|
||||
type SessionTokenBody = TokenBody
|
||||
|
||||
|
@ -77,6 +79,7 @@ type Token struct {
|
|||
}
|
||||
|
||||
// Deprecated: use Token instead.
|
||||
//
|
||||
//nolint:revive
|
||||
type SessionToken = Token
|
||||
|
||||
|
|
|
@ -84,8 +84,9 @@ func GlobalizeCommonFail(c *Code) {
|
|||
}
|
||||
|
||||
// LocalizeIfInSection checks if passed global status.Code belongs to the section and:
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// Arg must not be nil.
|
||||
func LocalizeIfInSection(c *Code, sec uint32) bool {
|
||||
|
|
|
@ -55,7 +55,7 @@ func (x *Info) ToGRPCMessage() grpc.Message {
|
|||
// FromGRPCMessage restores Info from grpc.Message.
|
||||
//
|
||||
// Supported types:
|
||||
// * subnet.SubnetInfo.
|
||||
// - subnet.SubnetInfo.
|
||||
func (x *Info) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*subnet.SubnetInfo)
|
||||
if !ok {
|
||||
|
|
Loading…
Reference in a new issue