From 1853349f2203b4b315c19cf36887d5c81d4a7f44 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 15 Sep 2022 08:20:13 +0300 Subject: [PATCH] [#415] *: Go fmt -s Signed-off-by: Evgenii Stratonikov --- container/attributes.go | 4 ++-- container/status.go | 5 +++-- netmap/attributes.go | 8 ++++---- object/status.go | 5 +++-- refs/convert.go | 2 +- session/status.go | 5 +++-- session/types.go | 3 +++ status/status.go | 5 +++-- subnet/info.go | 2 +- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/container/attributes.go b/container/attributes.go index 062e624..eb4b078 100644 --- a/container/attributes.go +++ b/container/attributes.go @@ -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. diff --git a/container/status.go b/container/status.go index 7f0edc0..499c855 100644 --- a/container/status.go +++ b/container/status.go @@ -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 { diff --git a/netmap/attributes.go b/netmap/attributes.go index 05f4d4a..4f69287 100644 --- a/netmap/attributes.go +++ b/netmap/attributes.go @@ -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() diff --git a/object/status.go b/object/status.go index a9a0faa..e1e96c8 100644 --- a/object/status.go +++ b/object/status.go @@ -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 { diff --git a/refs/convert.go b/refs/convert.go index b6dffe6..e402f50 100644 --- a/refs/convert.go +++ b/refs/convert.go @@ -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 { diff --git a/session/status.go b/session/status.go index bbcd3e2..a6dbfca 100644 --- a/session/status.go +++ b/session/status.go @@ -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 { diff --git a/session/types.go b/session/types.go index 139bf57..dfa8c5e 100644 --- a/session/types.go +++ b/session/types.go @@ -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 diff --git a/status/status.go b/status/status.go index 58d3b22..f300d5e 100644 --- a/status/status.go +++ b/status/status.go @@ -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 { diff --git a/subnet/info.go b/subnet/info.go index 16efb98..952b7e7 100644 --- a/subnet/info.go +++ b/subnet/info.go @@ -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 {