ci: add reviewdog (#1096)

This commit is contained in:
Kevin Wan
2021-09-29 13:09:20 +08:00
committed by GitHub
parent 80e3407be1
commit 65905b914d
23 changed files with 46 additions and 86 deletions

View File

@@ -105,13 +105,13 @@ func RawFieldNames(in interface{}, postgresSql ...bool) []string {
fi := typ.Field(i)
if tagv := fi.Tag.Get(dbTag); tagv != "" {
if pg {
out = append(out, fmt.Sprintf("%s", tagv))
out = append(out, tagv)
} else {
out = append(out, fmt.Sprintf("`%s`", tagv))
}
} else {
if pg {
out = append(out, fmt.Sprintf("%s", fi.Name))
out = append(out, fi.Name)
} else {
out = append(out, fmt.Sprintf("`%s`", fi.Name))
}