提交代码

This commit is contained in:
dandan 2024-10-24 22:14:56 +08:00
parent 130cc37800
commit cc711d9f7a
3 changed files with 11 additions and 9 deletions

View File

@ -1,9 +1,12 @@
timeout: 10s # 连接超时 timeout: 10s # 连接超时
read_timeout: 2s # 读超时 read_timeout: 2s # 读超时
write_timeout: 2s # 写超时 write_timeout: 2s # 写超时
write:
host: 10.10.103.131 # ip地址 host: 10.10.103.131 # ip地址
port: 6379 # 端口 port: 6379 # 端口
password: Worktask@Redis2023 password: Worktask@Redis2023
db: 0 #db db: 0 #db
timeout: 10s # 连接超时
read_timeout: 2s # 读超时
write_timeout: 2s # 写超时

View File

@ -1,18 +1,17 @@
package ginSwagger package ginSwagger
import ( import (
"github.com/Superdanda/hade/framework/gin"
"github.com/Superdanda/hade/framework/middleware/gin-swagger/swaggerFiles"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"os" "os"
"testing" "testing"
"github.com/gin-contrib/gzip"
"github.com/swaggo/swag" "github.com/swaggo/swag"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/swaggo/gin-swagger/swaggerFiles"
) )
type mockedSwag struct{} type mockedSwag struct{}
@ -119,7 +118,7 @@ func TestWithGzipMiddleware(t *testing.T) {
gin.SetMode(gin.TestMode) gin.SetMode(gin.TestMode)
router := gin.New() router := gin.New()
router.Use(gzip.Gzip(gzip.BestSpeed)) //router.Use(gzip.Gzip(gzip.BestSpeed))
router.GET("/*any", WrapHandler(swaggerFiles.Handler)) router.GET("/*any", WrapHandler(swaggerFiles.Handler))

BIN
hade.exe

Binary file not shown.