Skip to content

Commit

Permalink
use camelcase var names (#2123)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav authored Nov 22, 2023
1 parent 7d10e25 commit 0e6e1dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}

0 comments on commit 0e6e1dc

Please sign in to comment.