feat 包命名规范

This commit is contained in:
2026-02-11 14:48:21 +08:00
parent 0ca8a0ccbb
commit 558677bc3a
30 changed files with 162 additions and 123 deletions

View File

@@ -3,7 +3,7 @@ package utils
import (
"bytes"
"encoding/json"
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
"net/http/httptest"
@@ -26,7 +26,7 @@ func CreateTestContext(method, path string, body interface{}) (*httptest.Respons
}
// AssertResponse 断言返回值
func AssertResponse(ts *suite.Suite, w *httptest.ResponseRecorder, httpCode int, code *http_resp.Code) {
func AssertResponse(ts *suite.Suite, w *httptest.ResponseRecorder, httpCode int, code *httpresp.Code) {
ts.Assert().Equal(httpCode, w.Code)
var response map[string]interface{}
ts.Assert().NoError(json.Unmarshal(w.Body.Bytes(), &response))