Creating variables that begin with a number

Hello all!

Im working on some code to pull data from a database. I’m running into an issue creating a variable that begins with a number to match the one in the database to retrieve it. Any one know a workaround?


Please show us the relevant parts of your code. What do you mean by “creating a variable that begins with a number”?

For example:

tnt := “apples”

I am trying to see if there is a way to have
8count := “hello”

where 8count would be a variable

Why do you want this naming? Considering that the naming of the variable is not going to effect what you can do with it, but you can’t use a number to start a variable, and I’m assuming this has to do with exported and nonexported variables in Go. Since you can’t capitalize a number you would never be able to export a variable that begins with a number.


Thanks for the reply!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.