From a8f0c387e0843078adcb2df218d52d10f3d94175 Mon Sep 17 00:00:00 2001 From: Adam Shannon Date: Wed, 22 Mar 2023 11:37:59 -0500 Subject: [PATCH] meta: gofmt source files --- originatorToBeneficiary.go | 10 +++++----- originatorToBeneficiary_test.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/originatorToBeneficiary.go b/originatorToBeneficiary.go index 4560ead3..29c943aa 100644 --- a/originatorToBeneficiary.go +++ b/originatorToBeneficiary.go @@ -57,7 +57,7 @@ func (ob *OriginatorToBeneficiary) Parse(record string) error { length += read if len(ob.LineOne) >= 35 { - length += (strings.Index(record[length:], "*") +1) + length += (strings.Index(record[length:], "*") + 1) } value, read, err = ob.parseVariableStringField(record[length:], 35) if err != nil { @@ -66,8 +66,8 @@ func (ob *OriginatorToBeneficiary) Parse(record string) error { ob.LineTwo = value length += read - if len(ob.LineTwo) >= 35 { - length += (strings.Index(record[length:], "*") +1) + if len(ob.LineTwo) >= 35 { + length += (strings.Index(record[length:], "*") + 1) } value, read, err = ob.parseVariableStringField(record[length:], 35) if err != nil { @@ -76,8 +76,8 @@ func (ob *OriginatorToBeneficiary) Parse(record string) error { ob.LineThree = value length += read - if len(ob.LineThree) >= 35 { - length += (strings.Index(record[length:], "*") +1) + if len(ob.LineThree) >= 35 { + length += (strings.Index(record[length:], "*") + 1) } value, read, err = ob.parseVariableStringField(record[length:], 35) if err != nil { diff --git a/originatorToBeneficiary_test.go b/originatorToBeneficiary_test.go index b171f366..69415418 100644 --- a/originatorToBeneficiary_test.go +++ b/originatorToBeneficiary_test.go @@ -144,7 +144,7 @@ func TestStringOriginatorToBeneficiaryOptions(t *testing.T) { require.Equal(t, record.String(), record.Format(FormatOptions{VariableLengthFields: false})) } -// TestStringOriginatorToBeneficiaryOptionsWithExtraLength validates the length of each line if it exceeds the limit of 35 chars per line +// TestStringOriginatorToBeneficiaryOptionsWithExtraLength validates the length of each line if it exceeds the limit of 35 chars per line func TestStringOriginatorToBeneficiaryOptionsWithExtraLength(t *testing.T) { var line = "{6000}Lorem ipsum dolor sit amet, co WOODEN*adipiscing elit, sed do eiusmod 54F*022/FROM MYCOMPY INC. VIA MYBANKNIF*SUC INTERNAL BANK TO BANK TRANSFER,*" r := NewReader(strings.NewReader(line)) @@ -172,4 +172,4 @@ func TestStringOriginatorToBeneficiaryOptionsWithSmallerLength(t *testing.T) { require.Equal(t, r.currentFEDWireMessage.OriginatorToBeneficiary.LineTwo, "adipiscing elit, sed do eiusmod 54F") require.Equal(t, r.currentFEDWireMessage.OriginatorToBeneficiary.LineThree, "022/FROM INC. VIA MYBANKNIF") require.Equal(t, r.currentFEDWireMessage.OriginatorToBeneficiary.LineFour, "SUC INTERNAL BANK TO TRANSFER,") -} \ No newline at end of file +}