Skip to content

Commit

Permalink
fix a type bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed Jan 6, 2025
1 parent 85adbf5 commit a3b8d50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dml_select_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func defaultGetColumnsFromStruct(s any, table string) []Namer {
}

func init() {
typetables.Store(map[typetable][]string(nil))
typetables.Store(map[typetable][]Namer(nil))
}

var (
Expand Down
2 changes: 1 addition & 1 deletion dml_select_struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestSelectBuilderSelectStructWithTable(t *testing.T) {
SelectStructWithTable(SS2{}, "A")

var num int
for key := range typetables.Load().(map[typetable][]string) {
for key := range typetables.Load().(map[typetable][]Namer) {
switch fmt.Sprint(key.RType) {
case "sqlx.SS1", "sqlx.SS2":
num++
Expand Down

0 comments on commit a3b8d50

Please sign in to comment.