1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-04 11:40:18 +00:00

slice support

This commit is contained in:
Eyal Post
2017-04-23 21:37:09 +03:00
parent 89e01d125c
commit 19f4a6ac0b
4 changed files with 102 additions and 69 deletions

View File

@ -905,7 +905,7 @@ func (p *ControllerRegister) handleParamResponse(context *beecontext.Context, ex
//looping in reverse order for the case when both error and value are returned and error sets the response status code
for i := len(results) - 1; i >= 0; i-- {
result := results[i]
if !result.IsNil() {
if result.Kind() != reflect.Interface || !result.IsNil() {
resultValue := result.Interface()
response.RenderMethodResult(resultValue, context)
}