kw applies keyword casing to a keyword string.
(keyword string)
| 41 | |
| 42 | // kw applies keyword casing to a keyword string. |
| 43 | func (f *nodeFormatter) kw(keyword string) string { |
| 44 | switch f.opts.KeywordCase { |
| 45 | case ast.KeywordUpper: |
| 46 | return strings.ToUpper(keyword) |
| 47 | case ast.KeywordLower: |
| 48 | return strings.ToLower(keyword) |
| 49 | default: |
| 50 | return keyword |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // indentStr returns the current indentation string. |
| 55 | func (f *nodeFormatter) indentStr() string { |
no outgoing calls
no test coverage detected