DATA-DOG / go-sqlmock

Sql mock driver for golang to test database interactions
Other
6.02k stars 406 forks source link

Is json tag is not used in this tool #281

Closed sevenguin closed 2 months ago

sevenguin commented 2 years ago

type Temp struct { SourceType stringjson:"SourceKind" } when i mock like this: mockRows := sqlmock.NewRows([]string{"source_kind"}) it's unusefule, bug when i mock like this: mockRows := sqlmock.NewRows([]string{"source_type"}) it's ok.

fatelei commented 2 years ago

Please post some example code working on the Go Playground. Here is a template.

diegommm commented 2 months ago

Hi @sevenguin! Closing as there is not enough information to help you, unfortunately. If the problem persists, try providing:

Thank you!