mirror of
https://github.com/astaxie/beego.git
synced 2025-07-05 23:00:18 +00:00
golint fixes
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
//Keeps param information to be auto passed to controller methods
|
||||
//MethodParam keeps param information to be auto passed to controller methods
|
||||
type MethodParam struct {
|
||||
name string
|
||||
location paramLocation
|
||||
@ -22,6 +22,7 @@ const (
|
||||
header
|
||||
)
|
||||
|
||||
//New creates a new MethodParam with name and specific options
|
||||
func New(name string, opts ...MethodParamOption) *MethodParam {
|
||||
return newParam(name, nil, opts)
|
||||
}
|
||||
@ -34,6 +35,7 @@ func newParam(name string, parser paramParser, opts []MethodParamOption) (param
|
||||
return
|
||||
}
|
||||
|
||||
//Make creates an array of MethodParmas or an empty array
|
||||
func Make(list ...*MethodParam) []*MethodParam {
|
||||
if len(list) > 0 {
|
||||
return list
|
||||
|
Reference in New Issue
Block a user