I am trying to test a main package in go (in Windows) and the test seems to be cached, although I delete completely the cache (go clean -cache
).
To test this I changed a file (parseinput.go
), so that it produces an error during compilation (undefined variable). The result is, that main package cannot be built:
go\src\xxx\apimonitor> go build
# xxx/apimonitor
.\inputparser.go:15:2: undefined: err
.\inputparser.go:16:19: undefined: err
,but tests still complete successfully (go test
or even go test -a
):
go\src\xxx\apimonitor> go test
PASS
ok xxx/apimonitor 0.786s
Any clues as to why this keeps happening and why test does not recompile? Any other place where this package might be cached from previous builds?
Aucun commentaire:
Enregistrer un commentaire