mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2025-01-18 07:51:40 +03:00
fix linters
This commit is contained in:
parent
61618bc7f8
commit
81ce0c4ba8
@ -179,7 +179,6 @@ func getUzbekistanNationalNumber(phone string, parsedPhone *pn.PhoneNumber) (uin
|
||||
}
|
||||
|
||||
func getMexicanNationalNumber(parsedPhone *pn.PhoneNumber) (uint64, error) {
|
||||
result := parsedPhone.GetNationalNumber()
|
||||
phoneWithDigit := fmt.Sprintf("1%d", parsedPhone.GetNationalNumber())
|
||||
|
||||
num, err := strconv.Atoi(phoneWithDigit)
|
||||
@ -188,8 +187,7 @@ func getMexicanNationalNumber(parsedPhone *pn.PhoneNumber) (uint64, error) {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
result = uint64(num)
|
||||
return result, nil
|
||||
return uint64(num), nil //nolint:gosec
|
||||
}
|
||||
|
||||
func getCountryCode(phone string) string {
|
||||
|
@ -1,9 +1,10 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@ -119,7 +120,7 @@ func TestFormatNumberForWA(t *testing.T) {
|
||||
|
||||
for orig, expected := range numbers {
|
||||
actual, err := FormatNumberForWA(orig)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, expected, actual)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, expected, actual)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user