mirror of
https://github.com/burrowers/garble.git
synced 2025-12-24 12:58:05 +08:00
A recent PR added a bigger regression test for go-spew, and fixed an issue where we would obfuscate local named types even if they were embedded into local structs used for reflection. This would effectively mean we were obfuscating one field name, the one derived from the embedding, which we didn't want to. The fix did this by searching for embedded objects with extra code. However, as far as I can tell, that isn't necessary; we can do the right thing by recording all local type names just like we already do for all field names. This results in less complicated code, and avoids needing special logic to handle embedding struct types, so I reckon it's a win. Add even more tests to convince myself that we're still obfuscating local types and field names which aren't used for reflection.