go-sqlmock icon indicating copy to clipboard operation
go-sqlmock copied to clipboard

update the way expectations.go initializes the margs variable

Open sivchari opened this issue 4 years ago • 2 comments
trafficstars

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.

sivchari avatar Feb 15 '21 17:02 sivchari

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

l3pp4rd avatar Feb 17 '21 05:02 l3pp4rd

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

sivchari avatar Feb 17 '21 05:02 sivchari