1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 06:20:54 +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.
// params build query string as ?key1=value1&key2=value2...
func (b *BeegoHttpRequest) Param(key, value interface{}) *BeegoHttpRequest {
switch value.(type) {
case string:
b.params[key.(string)] = value.(string)
case []string:
b.params[key.(string)] = value.([]string)
}
func (b *BeegoHttpRequest) Param(key string, value interface{}) *BeegoHttpRequest {
b.params[key] = value
return b
}