1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-05 03:10:19 +00:00

defValue -> defaultValue

This commit is contained in:
Eyal Post
2017-05-11 17:58:25 +03:00
parent d3a16dca85
commit cb4f252a06
3 changed files with 10 additions and 13 deletions

View File

@ -24,7 +24,7 @@ func convertParam(param *MethodParam, paramType reflect.Type, ctx *beecontext.Co
if param.required {
ctx.Abort(400, fmt.Sprintf("Missing parameter %s", param.name))
} else {
paramValue = param.defValue
paramValue = param.defaultValue
}
}
@ -43,9 +43,6 @@ func getParamValue(param *MethodParam, ctx *beecontext.Context) string {
return string(ctx.Input.RequestBody)
case header:
return ctx.Input.Header(param.name)
// if strValue == "" && strings.Contains(param.name, "_") { //magically handle X-Headers?
// strValue = ctx.Input.Header(strings.Replace(param.name, "_", "-", -1))
// }
case path:
return ctx.Input.Query(":" + param.name)
default: