I have a query about how golang decides what is the current working directory. I have a .env file in the root directory and I have some pakages in the sub-directories of the project. When I run tests that are located in the sub-directories the godotenv package is trying to load .env file from the file's location i.e. the subdirectory instead of the root directory from where i run the tests. Is this expected behavior? What is the solution here?
#Current working directory
4 messages · Page 1 of 1 (latest)