1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:00:54 +00:00

Changing check from nil to len based on slice

This commit is contained in:
Bill Davis 2014-10-08 09:21:34 -04:00
parent b6f789c497
commit 1ba7847913

View File

@ -391,7 +391,7 @@ func (p *ControllerRegistor) InsertFilter(pattern string, pos int, filter Filter
if !RouterCaseSensitive { if !RouterCaseSensitive {
pattern = strings.ToLower(pattern) pattern = strings.ToLower(pattern)
} }
if params == nil { if len(params) == 0 {
mr.returnOnOutput = true mr.returnOnOutput = true
} else { } else {
mr.returnOnOutput = params[0] mr.returnOnOutput = params[0]