DATA-DOG / go-sqlmock

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

update the way expectations.go initializes the margs variable #254

Closed sivchari closed 2 months ago

sivchari commented 3 years ago

Hi, This is a small change, but it will send a PR. In the String function of expectations.go, there is a place where it initializes a variable called margs. I thought this would be better for Go's slice specification, since the capacity of the slice to be appended can be allocated in advance by the length of the args.

l3pp4rd commented 3 years ago

Hi, in this program it does not matter at all. It will not be called millions of times in unit tests and it will have no performance impact. I will not merge this for this very reason, hope it will be a lesson for you

sivchari commented 3 years ago

I comprehended you said. Thanks for reply. If there are something , I'll sent PR again.