rpad adds padding to the right of a string.
(s string, padding int)
| 297 | |
| 298 | // rpad adds padding to the right of a string. |
| 299 | func rpad(s string, padding int) string { |
| 300 | template := fmt.Sprintf("%%-%ds ", padding) |
| 301 | return fmt.Sprintf(template, s) |
| 302 | } |
| 303 | |
| 304 | func dedent(s string) string { |
| 305 | lines := strings.Split(s, "\n") |