(s string, spaces int)
| 8 | ) |
| 9 | |
| 10 | func indentBox(s string, spaces int) string { |
| 11 | pad := strings.Repeat(" ", spaces) |
| 12 | lines := strings.Split(s, "\n") |
| 13 | for i, l := range lines { |
| 14 | if len(l) == 0 { |
| 15 | continue |
| 16 | } |
| 17 | lines[i] = pad + l |
| 18 | } |
| 19 | return strings.Join(lines, "\n") |
| 20 | } |
| 21 | |
| 22 | func main() { |
| 23 | styles := []box.BoxStyle{ |