20 karma · joined Jun 23, 2023 (3y ago) · 3 submissions
comment 1y ago · link · parent
In Go, access to the os and exec require certain imports, imports that must occur at the beginning of the file, this helps when scanning for malicious code. Compare this JavaScript where one could require("child_process") or import() at any time.
Personally, I started to vendor my dependencies using go mod vendor and diff after dependency updates. In the end, you are responsible for the effect of your dependencies.
comment 2y ago · link · parent
comment 3y ago · link · parent
I have made such a library myself: https://github.com/decoverto/decoverto
Another library would be https://github.com/typestack/class-transformer