logSanitizeInput logs input parameters when debug logging is enabled.
(name string, opts *SanitizeOptions)
| 104 | |
| 105 | // logSanitizeInput logs input parameters when debug logging is enabled. |
| 106 | func logSanitizeInput(name string, opts *SanitizeOptions) { |
| 107 | if !sanitizeLog.Enabled() { |
| 108 | return |
| 109 | } |
| 110 | preserveCount := 0 |
| 111 | trimHyphens := false |
| 112 | if opts != nil { |
| 113 | preserveCount = len(opts.PreserveSpecialChars) |
| 114 | trimHyphens = opts.TrimHyphens |
| 115 | } |
| 116 | sanitizeLog.Printf("Sanitizing name: input=%q, preserve_chars=%d, trim_hyphens=%t", |
| 117 | name, preserveCount, trimHyphens) |
| 118 | } |
| 119 | |
| 120 | // normalizeSanitizeSeparators converts common separators to hyphens and optionally |
| 121 | // converts underscores when they are not in the preserve list. |
no test coverage detected