4 ms·
Show HN: Go-scrub: Scrubbing sensitive fields from a deeply nested Go struct
Go-scrub is a utility to mask a given set of field names from a deeply nested struct at any level. It is useful for logging structs which may have customer inputs (such as passwords, keys, etc.). It uses the "reflect" package to modify the struct values at runtime.
Code: https://github.com/ssrathi/go-scrub https://github.com/ssrathi/go-scrub
Blog post with an explanation: https://www.nutanix.dev/2022/04/22/golang-the-art-of-reflection/ https://www.nutanix.dev/2022/04/22/golang-the-art-of-reflect...