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

location=>paramType

This commit is contained in:
eyalpost
2017-05-12 09:28:46 +03:00
parent b6a35a8944
commit 0ac2e47162
5 changed files with 10 additions and 10 deletions

View File

@ -8,15 +8,15 @@ import (
//MethodParam keeps param information to be auto passed to controller methods
type MethodParam struct {
name string
location paramLocation
in paramType
required bool
defaultValue string
}
type paramLocation byte
type paramType byte
const (
param paramLocation = iota
param paramType = iota
path
body
header
@ -49,7 +49,7 @@ func (mp *MethodParam) String() string {
if mp.required {
options = append(options, "param.IsRequired")
}
switch mp.location {
switch mp.in {
case path:
options = append(options, "param.InPath")
case body: