You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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. |
3 years ago | |
---|---|---|
.. | ||
bench | 4 years ago | |
mod | 4 years ago | |
script | 3 years ago |