diff --git a/pkg/common/utils.go b/pkg/common/utils.go index 24ceb3252e4b..2e2a2ff0f256 100644 --- a/pkg/common/utils.go +++ b/pkg/common/utils.go @@ -61,8 +61,8 @@ func GetAccountNumFromAWSID(AWSID string) (string, error) { if len(AWSID) < 4 { return "", fmt.Errorf("AWSID is too short") } - trimmed_AWSID := AWSID[4:] - decodedBytes, err := base32.StdEncoding.WithPadding(base32.NoPadding).DecodeString(strings.ToUpper(trimmed_AWSID)) + trimmedAWSID := AWSID[4:] + decodedBytes, err := base32.StdEncoding.WithPadding(base32.NoPadding).DecodeString(strings.ToUpper(trimmedAWSID)) if err != nil { return "", err } @@ -75,6 +75,6 @@ func GetAccountNumFromAWSID(AWSID string) (string, error) { copy(data[2:], decodedBytes[0:6]) z := binary.BigEndian.Uint64(data) const mask uint64 = 0x7fffffffff80 - account_num := (z & mask) >> 7 - return fmt.Sprintf("%012d", account_num), nil + accountNum := (z & mask) >> 7 + return fmt.Sprintf("%012d", accountNum), nil }