From b731aa38af8e79d44ca0db7fb352340740ca8411 Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Fri, 13 Oct 2023 16:03:15 +0900 Subject: [PATCH] refactor: update builder.go (#3620) --- core/stores/builder/builder.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/stores/builder/builder.go b/core/stores/builder/builder.go index feee6874..a797de23 100644 --- a/core/stores/builder/builder.go +++ b/core/stores/builder/builder.go @@ -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