From b129ee3f04e6b4de558c664dc5d4cd3418f43654 Mon Sep 17 00:00:00 2001 From: John Guo Date: Tue, 24 Aug 2021 21:35:49 +0800 Subject: [PATCH] fix issue in unit testing case for package ghttp --- net/ghttp/ghttp_unit_error_code_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ghttp/ghttp_unit_error_code_test.go b/net/ghttp/ghttp_unit_error_code_test.go index c5484afda..ca77f4254 100644 --- a/net/ghttp/ghttp_unit_error_code_test.go +++ b/net/ghttp/ghttp_unit_error_code_test.go @@ -10,6 +10,7 @@ package ghttp_test import ( "fmt" + "github.com/gogf/gf/errors/gcode" "github.com/gogf/gf/errors/gerror" "github.com/gogf/gf/net/ghttp" "testing" @@ -30,7 +31,7 @@ func Test_Error_Code(t *testing.T) { r.Response.Write(gerror.Code(r.GetError())) }) group.ALL("/", func(r *ghttp.Request) { - panic(gerror.NewCode(10000, "test error")) + panic(gerror.NewCode(gcode.New(10000, "", nil), "test error")) }) }) s.SetPort(p)