为什么runtime.caller(0)在单元测试中使用'--cover'参数给出不同的路径

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.

It worked by using os.Getwd() and runtime.caller with a variable to diffrentiate between testing and normal running.