From 4c8fdedea56381c44fc3c0131712a2647984e441 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Tue, 18 Aug 2015 20:43:34 +0200 Subject: [PATCH] Remove duplication --- template.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/template.go b/template.go index c66b0f25..e67cea1d 100644 --- a/template.go +++ b/template.go @@ -174,10 +174,6 @@ func hasPrefix(prefix, s string) bool { return strings.HasPrefix(s, prefix) } -func parseBool(s string) (bool, error) { - return strconv.ParseBool(s) -} - // hasSuffix returns whether a given string is a suffix of another string func hasSuffix(suffix, s string) bool { return strings.HasSuffix(s, suffix) @@ -351,7 +347,7 @@ func newTemplate(name string) *template.Template { "keys": keys, "last": arrayLast, "replace": strings.Replace, - "parseBool": parseBool, + "parseBool": strconv.ParseBool, "parseJson": unmarshalJson, "queryEscape": url.QueryEscape, "sha1": hashSha1,