1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-29 09:54:13 +00:00

删除Param中的断言

This commit is contained in:
Shuai 2015-08-18 23:19:24 +08:00
parent 860006bfda
commit ff92f22d84

View File

@ -272,13 +272,8 @@ func (b *BeegoHttpRequest) SetProxy(proxy func(*http.Request) (*url.URL, error))
// Param adds query param in to request. // Param adds query param in to request.
// params build query string as ?key1=value1&key2=value2... // params build query string as ?key1=value1&key2=value2...
func (b *BeegoHttpRequest) Param(key, value interface{}) *BeegoHttpRequest { func (b *BeegoHttpRequest) Param(key string, value interface{}) *BeegoHttpRequest {
switch value.(type) { b.params[key] = value
case string:
b.params[key.(string)] = value.(string)
case []string:
b.params[key.(string)] = value.([]string)
}
return b return b
} }