Commits

Miki Tebeka  committed 2a9c254

comment

  • Participants
  • Parent commits fcac331

Comments (0)

Files changed (1)

 	Version = "0.1.0"
 )
 
-/* Encode num to base62 string. 
-*/
+// Encode encoders num to base62 string.
 func Encode(num uint64) string {
 	if num == 0 {
 		return "0"
 		arr = append(arr, alphabet[rem])
 	}
 
+	// Reverse the result array
 	for i, j := 0, len(arr)-1; i < j; i, j = i+1, j-1 {
 		arr[i], arr[j] = arr[j], arr[i]
 	}