Skip to content

Commit fb2c083

Browse files
Marius GundersenMarius Gundersen
authored andcommitted
tabs vs spaces...
1 parent dc56c16 commit fb2c083

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

template.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,6 @@ func coalesce(input ...interface{}) interface{} {
317317
return nil
318318
}
319319

320-
func trim(s string) string {
321-
return strings.TrimSpace(s)
322-
}
323-
324320
// trimPrefix returns a string without the prefix, if present
325321
func trimPrefix(prefix, s string) string {
326322
return strings.TrimPrefix(s, prefix)
@@ -331,6 +327,11 @@ func trimSuffix(suffix, s string) string {
331327
return strings.TrimSuffix(s, suffix)
332328
}
333329

330+
// trim returns the string without leading or trailing whitespace
331+
func trim(s string) string {
332+
return strings.TrimSpace(s)
333+
}
334+
334335
func newTemplate(name string) *template.Template {
335336
tmpl := template.New(name).Funcs(template.FuncMap{
336337
"closest": arrayClosest,
@@ -356,7 +357,7 @@ func newTemplate(name string) *template.Template {
356357
"split": strings.Split,
357358
"trimPrefix": trimPrefix,
358359
"trimSuffix": trimSuffix,
359-
"trim": trim,
360+
"trim": trim,
360361
"where": where,
361362
"whereExist": whereExist,
362363
"whereNotExist": whereNotExist,

0 commit comments

Comments
 (0)