afero icon indicating copy to clipboard operation
afero copied to clipboard

cannot mockgen ReadFile and WriteFile method.

Open guillaumemugerin opened this issue 3 years ago • 1 comments

I have generate a mock with mockgen for testing afero's function but it seems that WriteFile and ReadFile function are not be intergrate in an interface. Is there any solution to do it ? Thanks in advance

guillaumemugerin avatar Apr 15 '21 07:04 guillaumemugerin

create a new interface that has those two methods and the afero methods and then generate a mock for that new interface.

jxsl13 avatar Apr 29 '22 16:04 jxsl13