Skip to content

Commit 4c8fded

Browse files
author
Nicolas Rodriguez
committed
Remove duplication
1 parent 7bd8c96 commit 4c8fded

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

template.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,6 @@ func hasPrefix(prefix, s string) bool {
174174
return strings.HasPrefix(s, prefix)
175175
}
176176

177-
func parseBool(s string) (bool, error) {
178-
return strconv.ParseBool(s)
179-
}
180-
181177
// hasSuffix returns whether a given string is a suffix of another string
182178
func hasSuffix(suffix, s string) bool {
183179
return strings.HasSuffix(s, suffix)
@@ -351,7 +347,7 @@ func newTemplate(name string) *template.Template {
351347
"keys": keys,
352348
"last": arrayLast,
353349
"replace": strings.Replace,
354-
"parseBool": parseBool,
350+
"parseBool": strconv.ParseBool,
355351
"parseJson": unmarshalJson,
356352
"queryEscape": url.QueryEscape,
357353
"sha1": hashSha1,

0 commit comments

Comments
 (0)