Show HN: Go-scrub: Scrubbing sensitive fields from a deeply nested Go struct

by srathion 5/2/2022, 5:04 PMwith 0 comments

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

Blog post with an explanation: https://www.nutanix.dev/2022/04/22/golang-the-art-of-reflect...

0