Update def.go

`^(float)[(]\d+,\d+[)]`:          "float64",
	`^(float)[(]\d+,\d+[)] unsigned`: "float64",

One of these two lines of code doesn't work

我在这四行代码加了$. 这样就可以避免其它bug。
This commit is contained in:
lubin
2020-09-23 02:03:20 +08:00
committed by GitHub
parent 36b6de2a7b
commit 6c7b80dc92

View File

@@ -51,10 +51,10 @@ var TypeMysqlMatchMp = map[string]string{
`^(smallint)[(]\d+[)] unsigned`: "uint16",
`^(int)[(]\d+[)] unsigned`: "uint32",
`^(bigint)[(]\d+[)] unsigned`: "uint64",
`^(tinyint)[(]\d+[)]`: "int8",
`^(smallint)[(]\d+[)]`: "int16",
`^(int)[(]\d+[)]`: "int",
`^(bigint)[(]\d+[)]`: "int64",
`^(tinyint)[(]\d+[)]$`: "int8",
`^(smallint)[(]\d+[)]$`: "int16",
`^(int)[(]\d+[)]$`: "int",
`^(bigint)[(]\d+[)]$`: "int64",
`^(char)[(]\d+[)]`: "string",
`^(enum)[(](.)+[)]`: "string",
`^(varchar)[(]\d+[)]`: "string",