refactor: update builder.go (#3620)

master
Ikko Eltociear Ashimine 1 year ago committed by GitHub
parent bf996a1812
commit b731aa38af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,7 @@ import (
const dbTag = "db" const dbTag = "db"
// RawFieldNames converts golang struct field into slice string. // 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) out := make([]string, 0)
v := reflect.ValueOf(in) v := reflect.ValueOf(in)
if v.Kind() == reflect.Ptr { if v.Kind() == reflect.Ptr {
@ -17,8 +17,8 @@ func RawFieldNames(in any, postgresSql ...bool) []string {
} }
var pg bool var pg bool
if len(postgresSql) > 0 { if len(postgreSql) > 0 {
pg = postgresSql[0] pg = postgreSql[0]
} }
// we only accept structs // we only accept structs

Loading…
Cancel
Save