forked from TrueCloudLab/frostfs-sdk-go
[#322] *: Go fmt -s
go1.19 rewrites comments to proper render them in docs. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
7537fa0dec
commit
84888854ab
69 changed files with 272 additions and 219 deletions
|
@ -29,9 +29,9 @@ func (x *ServerInternal) fromStatusV2(st *status.Status) {
|
|||
// ToStatusV2 implements StatusV2 interface method.
|
||||
// If the value was returned by FromStatusV2, returns the source message.
|
||||
// Otherwise, returns message with
|
||||
// * code: INTERNAL;
|
||||
// * string message: empty;
|
||||
// * details: empty.
|
||||
// - code: INTERNAL;
|
||||
// - string message: empty;
|
||||
// - details: empty.
|
||||
func (x ServerInternal) ToStatusV2() *status.Status {
|
||||
x.v2.SetCode(globalizeCodeV2(status.Internal, status.GlobalizeCommonFail))
|
||||
return &x.v2
|
||||
|
@ -77,9 +77,9 @@ func (x *WrongMagicNumber) fromStatusV2(st *status.Status) {
|
|||
// ToStatusV2 implements StatusV2 interface method.
|
||||
// If the value was returned by FromStatusV2, returns the source message.
|
||||
// Otherwise, returns message with
|
||||
// * code: WRONG_MAGIC_NUMBER;
|
||||
// * string message: empty;
|
||||
// * details: empty.
|
||||
// - code: WRONG_MAGIC_NUMBER;
|
||||
// - string message: empty;
|
||||
// - details: empty.
|
||||
func (x WrongMagicNumber) ToStatusV2() *status.Status {
|
||||
x.v2.SetCode(globalizeCodeV2(status.WrongMagicNumber, status.GlobalizeCommonFail))
|
||||
return &x.v2
|
||||
|
@ -104,9 +104,9 @@ func (x *WrongMagicNumber) WriteCorrectMagic(magic uint64) {
|
|||
|
||||
// CorrectMagic returns network magic returned by the server.
|
||||
// Second value indicates presence status:
|
||||
// * -1 if number is presented in incorrect format
|
||||
// * 0 if number is not presented
|
||||
// * +1 otherwise
|
||||
// - -1 if number is presented in incorrect format
|
||||
// - 0 if number is not presented
|
||||
// - +1 otherwise
|
||||
func (x WrongMagicNumber) CorrectMagic() (magic uint64, ok int8) {
|
||||
x.v2.IterateDetails(func(d *status.Detail) bool {
|
||||
if d.ID() == status.DetailIDCorrectMagic {
|
||||
|
@ -145,10 +145,10 @@ func (x *SignatureVerification) fromStatusV2(st *status.Status) {
|
|||
// ToStatusV2 implements StatusV2 interface method.
|
||||
// If the value was returned by FromStatusV2, returns the source message.
|
||||
// Otherwise, returns message with
|
||||
// * code: SIGNATURE_VERIFICATION_FAIL;
|
||||
// * string message: written message via SetMessage or
|
||||
// "signature verification failed" as a default message;
|
||||
// * details: empty.
|
||||
// - code: SIGNATURE_VERIFICATION_FAIL;
|
||||
// - string message: written message via SetMessage or
|
||||
// "signature verification failed" as a default message;
|
||||
// - details: empty.
|
||||
func (x SignatureVerification) ToStatusV2() *status.Status {
|
||||
x.v2.SetCode(globalizeCodeV2(status.SignatureVerificationFail, status.GlobalizeCommonFail))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue