1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 05:00:54 +00:00

rename for clarity

This commit is contained in:
ZhengYang 2014-08-21 11:55:54 +08:00
parent 99b99321e9
commit b9ff4255ff

View File

@ -41,7 +41,7 @@ type MvcPath struct {
}
// typeMapping maps SQL data type to corresponding Go data type
var typeMapping = map[string]string{
var typeMappingMysql = map[string]string{
"int": "int", // int signed
"integer": "int",
"tinyint": "int8",
@ -665,7 +665,7 @@ func camelCase(in string) string {
// getGoDataType maps an SQL data type to Golang data type
func getGoDataType(sqlType string) (goType string) {
if v, ok := typeMapping[sqlType]; ok {
if v, ok := typeMappingMysql[sqlType]; ok {
return v
} else {
fmt.Println("Error:", sqlType, "not found!")