In main.go, There was a method findInModule that gets relative path from go.mod . I transformed it to a function to reuse it
Implemented findPackagePath to calculate the import path, and replaced existing process with it
Confirmation
I confirmed it works on a project structure shown as examples in #33
% gobco # existing version 1.3.2
# github.com/1st-vil/awesomeProject/something_test [github.com/1st-vil/awesomeProject/something.test]
./gobco_bridge_test.go:6:19: undefined: something.GobcoCover
FAIL github.com/1st-vil/awesomeProject/something [build failed]
FAIL
go test .: exit status 1
% ~/gobco/gobco # executable file created from this PR
ok github.com/1st-vil/awesomeProject/something 0.457s
Condition coverage: 0/0
Overview
I fixed #33
Changed points
main.go
, There was a methodfindInModule
that gets relative path fromgo.mod
. I transformed it to a function to reuse itfindPackagePath
to calculate the import path, and replaced existing process with itConfirmation
I confirmed it works on a project structure shown as examples in #33