Explorar o código

修改变量名

yjp hai 1 ano
pai
achega
4336c80d33
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      project/gateway/main.go

+ 2 - 2
project/gateway/main.go

@@ -28,11 +28,11 @@ func main() {
 	gw := gateway.NewGateway()
 	defer gateway.DestroyGateway(gw)
 
-	gw.BindPassThrough(prefixRootBinder, &gateway.PassThrough{
+	gw.Redirect(prefixRootBinder, &gateway.PassThrough{
 		HttpMethod: http.MethodGet,
 		SimplePassThrough: &gateway.SimplePassThrough{
 			RelativePath: "/version",
-			ToUrl:        "http://localhost:31000/example/api/version",
+			ToBaseUrl:    "http://localhost:31000/example/api",
 		},
 	})