mirror of
https://github.com/foomo/squadron.git
synced 2025-10-16 12:35:42 +00:00
19 lines
309 B
Go
19 lines
309 B
Go
package template
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func indent(spaces int, v string) string {
|
|
pad := strings.Repeat(" ", spaces)
|
|
return strings.ReplaceAll(v, "\n", "\n"+pad)
|
|
}
|
|
|
|
func quote(v string) string {
|
|
return "'" + v + "'"
|
|
}
|
|
|
|
func replace(old, new, v string) string {
|
|
return strings.ReplaceAll(v, old, new)
|
|
}
|