From 6c7b80dc923cdf3ff734cd77d36c62226dc0f465 Mon Sep 17 00:00:00 2001 From: lubin Date: Wed, 23 Sep 2020 02:03:20 +0800 Subject: [PATCH] Update def.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `^(float)[(]\d+,\d+[)]`: "float64", `^(float)[(]\d+,\d+[)] unsigned`: "float64", One of these two lines of code doesn't work 我在这四行代码加了$. 这样就可以避免其它bug。 --- data/view/cnf/def.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/view/cnf/def.go b/data/view/cnf/def.go index 8125b49..bc951ba 100644 --- a/data/view/cnf/def.go +++ b/data/view/cnf/def.go @@ -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",