You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps it's my unfamiliarity with Go, but I'm seeing two small errors in how the check digit is calculated.
Comparing the code in ups.go to the algorithm described here, it appears that line 55 should subtract 48 instead of 3 from the ascii value of the character.
Line 63 should also be enclosed in an else. As it stands the running sum of calculations for characters in the odd position also includes characters in the even position as well.
The text was updated successfully, but these errors were encountered:
Perhaps it's my unfamiliarity with Go, but I'm seeing two small errors in how the check digit is calculated.
Comparing the code in ups.go to the algorithm described here, it appears that line 55 should subtract 48 instead of 3 from the ascii value of the character.
Line 63 should also be enclosed in an else. As it stands the running sum of calculations for characters in the odd position also includes characters in the even position as well.
The text was updated successfully, but these errors were encountered: