For instance, I want to use the go-cmp package but I only need it in tests. Will it be included in compiled binary if I never use it outside tests?
Test files (files ending with *_test.go) are treated differently during compilation. They are linked separately and can access internal packages like go-cmp
used for testing purposes.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.