SprintList returns the example help text as a string
()
| 115 | |
| 116 | // SprintList returns the example help text as a string |
| 117 | func SprintList() string { |
| 118 | var algos transform.Algo |
| 119 | var charmaps transform.CharmapChoices |
| 120 | |
| 121 | s := commandTable() |
| 122 | s += "\nConversion modes:\n\n```text\n" |
| 123 | for _, v := range algos.Choices() { |
| 124 | s += v + "\n" |
| 125 | } |
| 126 | s += "```\n\n" |
| 127 | |
| 128 | s += "Char maps:\n\n```text\n" |
| 129 | for _, v := range charmaps.Choices() { |
| 130 | s += v + "\n" |
| 131 | } |
| 132 | s += "```\n\n" |
| 133 | |
| 134 | s += "Encoding masks:\n\n```text\n" |
| 135 | for _, v := range strings.Split(encoder.ValidStrings(), ", ") { |
| 136 | s += v + "\n" |
| 137 | } |
| 138 | s += "```\n\n" |
| 139 | |
| 140 | s += sprintExamples() |
| 141 | |
| 142 | return s |
| 143 | } |
| 144 | |
| 145 | // Output the help to stdout |
| 146 | func main() { |
no test coverage detected
searching dependent graphs…