How to call a function from a test file to another test file in golang?
As long as the files are next to each other, you can call the function without needing to import explicitly.
However, if you’re referring to test helper functions, then you will need to develop them like a proper package.
Here is a reference example (I used it across all my Go projects):
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.