mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
Merge pull request #743 from 1920853199/develop
fix issues #730 bee generate appcode [index out of range [2] with length 0]
This commit is contained in:
commit
958e4564d1
@ -925,9 +925,9 @@ func extractColSize(colType string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func extractIntSignness(colType string) string {
|
func extractIntSignness(colType string) string {
|
||||||
regex := regexp.MustCompile(`(int|smallint|mediumint|bigint)\([0-9]+\)(.*)`)
|
regex := regexp.MustCompile(`(int|smallint|mediumint|bigint).*`)
|
||||||
signRegex := regex.FindStringSubmatch(colType)
|
signRegex := regex.FindStringSubmatch(colType)
|
||||||
return strings.Trim(signRegex[2], " ")
|
return strings.Trim(signRegex[1], " ")
|
||||||
}
|
}
|
||||||
|
|
||||||
func extractDecimal(colType string) (digits string, decimals string) {
|
func extractDecimal(colType string) (digits string, decimals string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user