mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 12:01:29 +00:00
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: httplib/httplib.go
This commit is contained in:
commit
b390667374
@ -83,6 +83,9 @@ func newBeegoRequest(url, method string) *BeegoHttpRequest {
|
|||||||
var resp http.Response
|
var resp http.Response
|
||||||
req.Method = method
|
req.Method = method
|
||||||
req.Header = http.Header{}
|
req.Header = http.Header{}
|
||||||
|
req.Proto = "HTTP/1.1"
|
||||||
|
req.ProtoMajor = 1
|
||||||
|
req.ProtoMinor = 1
|
||||||
return &BeegoHttpRequest{url, &req, map[string]string{}, map[string]string{}, defaultSetting, &resp, nil}
|
return &BeegoHttpRequest{url, &req, map[string]string{}, map[string]string{}, defaultSetting, &resp, nil}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,10 +106,10 @@ func SliceDiff(slice1, slice2 []interface{}) (diffslice []interface{}) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// SliceIntersect returns diff slice of slice1 - slice2.
|
// SliceIntersect returns slice that are present in all the slice1 and slice2.
|
||||||
func SliceIntersect(slice1, slice2 []interface{}) (diffslice []interface{}) {
|
func SliceIntersect(slice1, slice2 []interface{}) (diffslice []interface{}) {
|
||||||
for _, v := range slice1 {
|
for _, v := range slice1 {
|
||||||
if !InSliceIface(v, slice2) {
|
if InSliceIface(v, slice2) {
|
||||||
diffslice = append(diffslice, v)
|
diffslice = append(diffslice, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user