2 Star 9 Fork 11

联犀/中台模块

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
debugGetLogic.go 759 Bytes
一键复制 编辑 原始数据 按行查看 历史
杨磊 提交于 7个月前 . feat: 更新mod
package common
import (
"context"
"net/http"
"gitee.com/unitedrhino/core/service/apisvr/internal/svc"
"gitee.com/unitedrhino/core/service/apisvr/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type DebugGetLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewDebugGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DebugGetLogic {
return &DebugGetLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *DebugGetLogic) DebugGet(r *http.Request) (resp *types.DebugResp, err error) {
var headers = make(map[string]string)
for k, v := range r.Header {
headers[k] = v[0]
}
return &types.DebugResp{
RequestUri: r.RequestURI,
Headers: headers,
}, nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/unitedrhino/core.git
git@gitee.com:unitedrhino/core.git
unitedrhino
core
中台模块
v1.4.1

搜索帮助