Redact replaces private information from the context with a set of placeholder values.
(ctx DnoteCtx)
| 49 | // Redact replaces private information from the context with a set of |
| 50 | // placeholder values. |
| 51 | func Redact(ctx DnoteCtx) DnoteCtx { |
| 52 | var sessionKey string |
| 53 | if ctx.SessionKey != "" { |
| 54 | sessionKey = "1" |
| 55 | } else { |
| 56 | sessionKey = "0" |
| 57 | } |
| 58 | ctx.SessionKey = sessionKey |
| 59 | |
| 60 | return ctx |
| 61 | } |