From e4fd05106a17bc22317f389736fd7ea39b87d385 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 2 Jun 2016 17:05:15 -0700 Subject: [PATCH] Screw it, let functions take only one argument instead of requiring two --- pkg/templatelib/lib.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/templatelib/lib.go b/pkg/templatelib/lib.go index d3aeef1..c105dd7 100644 --- a/pkg/templatelib/lib.go +++ b/pkg/templatelib/lib.go @@ -15,8 +15,8 @@ func swapStringsFuncBoolArgsOrder(a func(string, string) bool) func(string, stri func stringsActionFactory(name string, actOnFirst bool, action func([]string, string) string) func(args ...interface{}) string { return func(args ...interface{}) string { - if len(args) < 2 { - panic(fmt.Sprintf(`%q requires at least two arguments`, name)) + if len(args) < 1 { + panic(fmt.Sprintf(`%q requires at least one argument`, name)) } var str string