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{} {
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
325321func 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+
334335func 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 ,
You can’t perform that action at this time.
0 commit comments