File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import (
13
13
"os"
14
14
"path/filepath"
15
15
"reflect"
16
+ "strconv"
16
17
"strings"
17
18
"syscall"
18
19
"text/template"
@@ -173,6 +174,10 @@ func hasPrefix(prefix, s string) bool {
173
174
return strings .HasPrefix (s , prefix )
174
175
}
175
176
177
+ func parseBool (s string ) (bool , error ) {
178
+ return strconv .ParseBool (s )
179
+ }
180
+
176
181
// hasSuffix returns whether a given string is a suffix of another string
177
182
func hasSuffix (suffix , s string ) bool {
178
183
return strings .HasSuffix (s , suffix )
@@ -346,6 +351,7 @@ func newTemplate(name string) *template.Template {
346
351
"keys" : keys ,
347
352
"last" : arrayLast ,
348
353
"replace" : strings .Replace ,
354
+ "parseBool" : parseBool ,
349
355
"parseJson" : unmarshalJson ,
350
356
"queryEscape" : url .QueryEscape ,
351
357
"sha1" : hashSha1 ,
You can’t perform that action at this time.
0 commit comments