Closed andriussev closed 11 years ago
Why would a struct have snake cased (underscored) names?
snake_case is C style, Go uses CamelCase
Furthermore, you can't unpack to a snake_cased name, because it would be a private struct field (because it's lowercase)
Well, there's no error in creating variables that have underscores. Like "User_id". If the library converted those variable names to camelcase when creating table, then I would get it. But it creates the table with underscores and then does not let to parse the results from the table because it converts it to camelcase when parsing, then it's a problem, in my opinion. It at least deserves a mention in the documentation.
I'd also say that this is a doc fix.
All the results with underscore names become camelcased and are not added to the returned struct if it has underscored names. When creating the table, no warning is given about this and the table columns are not converted to camelcase either. No mention about this in the documentation.