Redactor is an interface for types that may contain sensitive information (like passwords), which shouldn't be printed to the log. The idea was found in relog as part of the vitness project.
| 21 | // (like passwords), which shouldn't be printed to the log. The idea was found |
| 22 | // in relog as part of the vitness project. |
| 23 | type Redactor interface { |
| 24 | Redacted() interface{} |
| 25 | } |
| 26 | |
| 27 | // Redact returns a string of * having the same length as s. |
| 28 | func Redact(s string) string { |