mirror of
https://github.com/beego/bee.git
synced 2024-11-22 15:10:54 +00:00
Merge pull request #139 from WnP/logfmt
fix typo and missing end-of-line
This commit is contained in:
commit
755eaad4fe
@ -48,12 +48,12 @@ func generateSQLFromFields(fields string) string {
|
|||||||
for i, v := range fds {
|
for i, v := range fds {
|
||||||
kv := strings.SplitN(v, ":", 2)
|
kv := strings.SplitN(v, ":", 2)
|
||||||
if len(kv) != 2 {
|
if len(kv) != 2 {
|
||||||
ColorLog("[ERRO] the filds format is wrong. should key:type,key:type " + v)
|
ColorLog("[ERRO] the fields format is wrong. should key:type,key:type " + v + "\n")
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
typ, tag := getSqlType(kv[1])
|
typ, tag := getSqlType(kv[1])
|
||||||
if typ == "" {
|
if typ == "" {
|
||||||
ColorLog("[ERRO] the filds format is wrong. should key:type,key:type " + v)
|
ColorLog("[ERRO] the fields format is wrong. should key:type,key:type " + v + "\n")
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if i == 0 && strings.ToLower(kv[0]) != "id" {
|
if i == 0 && strings.ToLower(kv[0]) != "id" {
|
||||||
|
Loading…
Reference in New Issue
Block a user