Unable to cast "09" of type string to int

Not a bug but a strange feature nonetheless:strconv package - strconv - Go Packages

the base is implied by the string’s prefix: base 16 for “0x”, base 8 for “0”, and base 10 otherwise.

That’s a really really bad design decision IMO… couldn’t they simply make the prefix for octals to be "0o" (“o” for octal) or something else would wouldn’t false match decimal numbers? Having decimal numbers with leading zeros is not very uncommon!

So yeah… removing the leading 0’s should do the trick.