摘要: 1、使用的包是 net/http/httptest 2、单元测试需要启动 gin 服务,然后 httptest.NewRequest 发送请求 示例代码: mkdir gin cd gin go mod init example.com go get github.com/gin-gonic/gin 阅读全文
posted @ 2022-06-17 09:51 许伟强 阅读(575) 评论(0) 推荐(0) 编辑