formatString is a helper function that prints "_" if FmtHideConstants is set, and otherwise prints the given string.
(ctx *tree.FmtCtx, str string)
| 1378 | // formatString is a helper function that prints "_" if FmtHideConstants is set, |
| 1379 | // and otherwise prints the given string. |
| 1380 | func formatString(ctx *tree.FmtCtx, str string) { |
| 1381 | if ctx.HasFlags(tree.FmtHideConstants) { |
| 1382 | ctx.WriteString("_") |
| 1383 | } else { |
| 1384 | ctx.WriteString(str) |
| 1385 | } |
| 1386 | } |
| 1387 | |
| 1388 | // formatStringQuotes is similar to formatString, but surrounds the output with |
| 1389 | // single quotes. |
no test coverage detected
searching dependent graphs…