String renders the profile name for /config display.
()
| 55 | |
| 56 | // String renders the profile name for /config display. |
| 57 | func (p Profile) String() string { |
| 58 | switch p { |
| 59 | case ProfileTrueColor: |
| 60 | return "truecolor" |
| 61 | case ProfileANSI256: |
| 62 | return "256-color" |
| 63 | case ProfileANSI: |
| 64 | return "16-color" |
| 65 | case ProfileASCII: |
| 66 | return "ascii" |
| 67 | default: |
| 68 | return "no-tty" |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // Termenv maps the profile to a termenv.Profile so glamour's |
| 73 | // WithColorProfile can downgrade markdown rendering in lock-step with the |
no outgoing calls