rpad adds padding to the right of a string.
(s string, padding int)
| 282 | |
| 283 | // rpad adds padding to the right of a string. |
| 284 | func rpad(s string, padding int) string { |
| 285 | template := fmt.Sprintf("%%-%ds ", padding) |
| 286 | return fmt.Sprintf(template, s) |
| 287 | } |
| 288 | |
| 289 | func dedent(s string) string { |
| 290 | lines := strings.Split(s, "\n") |