FormatStringConstant formats a constant string value, redacting it if FmtHideConstants is set.
(s string)
| 525 | // FormatStringConstant formats a constant string value, redacting it if |
| 526 | // FmtHideConstants is set. |
| 527 | func (ctx *FmtCtx) FormatStringConstant(s string) { |
| 528 | ctx.WriteString("'") |
| 529 | if ctx.HasFlags(FmtHideConstants) { |
| 530 | ctx.WriteString("_") |
| 531 | } else { |
| 532 | ctx.WriteString(s) |
| 533 | } |
| 534 | ctx.WriteString("'") |
| 535 | } |
| 536 | |
| 537 | // FormatStringDollarQuotes formats a string constant with dollar quotes. |
| 538 | func (ctx *FmtCtx) FormatStringDollarQuotes(s string) { |
no test coverage detected