feat: 升级 samber/do v1 → v2
This commit is contained in:
+3
-3
@@ -37,7 +37,7 @@ var wsUpgrader = websocket.Upgrader{
|
||||
|
||||
func (this HttpStatusResponse) Get(path ...string) req.GlobalParams {
|
||||
if this.body == nil {
|
||||
return req.NewGlobalParam("", nil)
|
||||
return req.NewGlobalParams("", nil)
|
||||
}
|
||||
return this.body.Get(path...)
|
||||
}
|
||||
@@ -50,7 +50,7 @@ func (this HttpStatusResponse) Send(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (this RawResponse) Get(path ...string) req.GlobalParams {
|
||||
return lo.Ternary(len(path) == 0, req.NewGlobalParam(string(this.raw), nil), req.NewGlobalParam(string(this.raw), nil).Get(strings.Join(path, ".")))
|
||||
return lo.Ternary(len(path) == 0, req.NewGlobalParams(string(this.raw), nil), req.NewGlobalParams(string(this.raw), nil).Get(strings.Join(path, ".")))
|
||||
}
|
||||
|
||||
func (this RawResponse) Send(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -72,7 +72,7 @@ func (this FileResponse) Get(path ...string) req.GlobalParams {
|
||||
"name": this.name,
|
||||
"disposition": this.disposition,
|
||||
}); err == nil {
|
||||
return lo.Ternary(len(path) == 0, req.NewGlobalParam(string(resp), nil), req.NewGlobalParam(string(resp), nil).Get(strings.Join(path, ".")))
|
||||
return lo.Ternary(len(path) == 0, req.NewGlobalParams(string(resp), nil), req.NewGlobalParams(string(resp), nil).Get(strings.Join(path, ".")))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user