mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-02 16:28:39 +08:00
refactor: update builder.go (#3620)
This commit is contained in:
parent
bf996a1812
commit
b731aa38af
@ -9,7 +9,7 @@ import (
|
||||
const dbTag = "db"
|
||||
|
||||
// RawFieldNames converts golang struct field into slice string.
|
||||
func RawFieldNames(in any, postgresSql ...bool) []string {
|
||||
func RawFieldNames(in any, postgreSql ...bool) []string {
|
||||
out := make([]string, 0)
|
||||
v := reflect.ValueOf(in)
|
||||
if v.Kind() == reflect.Ptr {
|
||||
@ -17,8 +17,8 @@ func RawFieldNames(in any, postgresSql ...bool) []string {
|
||||
}
|
||||
|
||||
var pg bool
|
||||
if len(postgresSql) > 0 {
|
||||
pg = postgresSql[0]
|
||||
if len(postgreSql) > 0 {
|
||||
pg = postgreSql[0]
|
||||
}
|
||||
|
||||
// we only accept structs
|
||||
|
Loading…
Reference in New Issue
Block a user