From 1ba7847913414e800d100651889dcae1bcb3c22a Mon Sep 17 00:00:00 2001 From: Bill Davis Date: Wed, 8 Oct 2014 09:21:34 -0400 Subject: [PATCH] Changing check from nil to len based on slice --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index e22b5c1f..0d51410b 100644 --- a/router.go +++ b/router.go @@ -391,7 +391,7 @@ func (p *ControllerRegistor) InsertFilter(pattern string, pos int, filter Filter if !RouterCaseSensitive { pattern = strings.ToLower(pattern) } - if params == nil { + if len(params) == 0 { mr.returnOnOutput = true } else { mr.returnOnOutput = params[0]