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 (
1313 "os"
1414 "path/filepath"
1515 "reflect"
16+ "strconv"
1617 "strings"
1718 "syscall"
1819 "text/template"
@@ -173,6 +174,10 @@ func hasPrefix(prefix, s string) bool {
173174 return strings .HasPrefix (s , prefix )
174175}
175176
177+ func parseBool (s string ) (bool , error ) {
178+ return strconv .ParseBool (s )
179+ }
180+
176181// hasSuffix returns whether a given string is a suffix of another string
177182func hasSuffix (suffix , s string ) bool {
178183 return strings .HasSuffix (s , suffix )
@@ -346,6 +351,7 @@ func newTemplate(name string) *template.Template {
346351 "keys" : keys ,
347352 "last" : arrayLast ,
348353 "replace" : strings .Replace ,
354+ "parseBool" : parseBool ,
349355 "parseJson" : unmarshalJson ,
350356 "queryEscape" : url .QueryEscape ,
351357 "sha1" : hashSha1 ,
You can’t perform that action at this time.
0 commit comments