You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by ba...@apache.org on 2020/08/09 12:48:20 UTC

[dubbo-go] 08/13: remove new function

This is an automated email from the ASF dual-hosted git repository.

baze pushed a commit to branch 1.4
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git

commit 4736cdcdf005405c9c4d5c07979a6733c454053d
Author: Patrick <dr...@foxmail.com>
AuthorDate: Wed Apr 1 23:43:15 2020 +0800

    remove new function
---
 protocol/rest/server/server_impl/go_restful_server.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/protocol/rest/server/server_impl/go_restful_server.go b/protocol/rest/server/server_impl/go_restful_server.go
index 00b644f..667d58c 100644
--- a/protocol/rest/server/server_impl/go_restful_server.go
+++ b/protocol/rest/server/server_impl/go_restful_server.go
@@ -83,7 +83,7 @@ func (grs *GoRestfulServer) Start(url common.URL) {
 // Publish a http api in go-restful server
 // The routeFunc should be invoked when the server receive a request
 func (grs *GoRestfulServer) Deploy(restMethodConfig *config.RestMethodConfig, routeFunc func(request server.RestServerRequest, response server.RestServerResponse)) {
-	ws := new(restful.WebService)
+	ws := &restful.WebService{}
 	rf := func(req *restful.Request, resp *restful.Response) {
 		routeFunc(NewGoRestfulRequestAdapter(req), resp)
 	}