Files
garble/testdata/script
pagran 7c50979899 ensure that all imports are used after obfuscation
garble's -literals flag and its patching of the runtime may leave unused imports.
We used to try to detect those and remove the imports,
but that was still buggy with edge cases like dot imports or renamed imports.

Moreover, it was potentially incorrect.
Completely removing an import from a package means we don't run its init funcs,
which could have side effects changing the behavior of a program.
As an example, database/sql drivers are registered at init time.

Instead, for each import in an obfuscated Go file,
add an unnamed declaration which references the imported package.
This may not be necessary for all imported packages,
as only a minority become unused due to garble,
but it's also relatively harmless to do so.

Fixes #658.
2023-01-31 19:11:59 +00:00
..
2022-10-02 00:33:54 +01:00
2022-10-02 00:33:54 +01:00
2022-10-02 00:33:54 +01:00
2022-10-02 00:33:54 +01:00
2022-12-15 00:03:58 +01:00