File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -317,10 +317,6 @@ func coalesce(input ...interface{}) interface{} {
317
317
return nil
318
318
}
319
319
320
- func trim (s string ) string {
321
- return strings .TrimSpace (s )
322
- }
323
-
324
320
// trimPrefix returns a string without the prefix, if present
325
321
func trimPrefix (prefix , s string ) string {
326
322
return strings .TrimPrefix (s , prefix )
@@ -331,6 +327,11 @@ func trimSuffix(suffix, s string) string {
331
327
return strings .TrimSuffix (s , suffix )
332
328
}
333
329
330
+ // trim returns the string without leading or trailing whitespace
331
+ func trim (s string ) string {
332
+ return strings .TrimSpace (s )
333
+ }
334
+
334
335
func newTemplate (name string ) * template.Template {
335
336
tmpl := template .New (name ).Funcs (template.FuncMap {
336
337
"closest" : arrayClosest ,
@@ -356,7 +357,7 @@ func newTemplate(name string) *template.Template {
356
357
"split" : strings .Split ,
357
358
"trimPrefix" : trimPrefix ,
358
359
"trimSuffix" : trimSuffix ,
359
- "trim" : trim ,
360
+ "trim" : trim ,
360
361
"where" : where ,
361
362
"whereExist" : whereExist ,
362
363
"whereNotExist" : whereNotExist ,
You can’t perform that action at this time.
0 commit comments