indentStr returns the current indentation string.
()
| 53 | |
| 54 | // indentStr returns the current indentation string. |
| 55 | func (f *nodeFormatter) indentStr() string { |
| 56 | if f.opts.IndentWidth == 0 { |
| 57 | return "" |
| 58 | } |
| 59 | ch := " " |
| 60 | if f.opts.IndentStyle == ast.IndentTabs { |
| 61 | ch = "\t" |
| 62 | } |
| 63 | return strings.Repeat(ch, f.opts.IndentWidth*f.depth) |
| 64 | } |
| 65 | |
| 66 | // clauseSep returns the separator between SQL clauses. |
| 67 | func (f *nodeFormatter) clauseSep() string { |
no outgoing calls
no test coverage detected