When trying to execute a unit test function without any argument it give following output path
C:/Program Files (x86)/Go1.8\bin\go.exe" test -v gclassec/skyline/loggers -run ^TestCreateLogFilesPath$
filePath:=== C:/GerritNew/goclassec/src/gclassec/skyline/loggers/logs.go
But when I try to run it with any argument such as --cover
the file path value changes as below:
"C:/Program Files (x86)/Go1.8\bin\go.exe" test -v --cover gclassec/skyline/loggers -run ^TestCreateLogFilesPath$
filePath:=== gclassec/skyline/loggers/_test/_obj_test/logs.go
I am using runtime.caller(0)
to get file path.