AOYeah, should work if FileInfo is mocked and returned from osStats callReply·Article·Feb 9, 2025·Mocking Imported Libraries in Golang Unit Tests
AOThis is quite good. Clearly defines what it means to write maintainable code. I'd love to see how it would have handled FileInfo.IsDir() although it could be taken care of with fstest.Comment·Article·Feb 8, 2025·Mocking Imported Libraries in Golang Unit Tests