From 4c710bf943a40068ce2f40f1fa4b4d767a296122 Mon Sep 17 00:00:00 2001 From: yanweidong Date: Sun, 9 Aug 2026 19:51:48 +0800 Subject: [PATCH] fix server.go --- tpl/server.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tpl/server.go b/tpl/server.go index e3c77de..988ed7c 100644 --- a/tpl/server.go +++ b/tpl/server.go @@ -5,18 +5,12 @@ var NewFile = ` package server import ( - "context" - "net/http" - "os" - "strings" - "time" {import} - "git.apinb.com/bsm-sdk/core/vars" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/reflection" - "google.golang.org/protobuf/proto" + "context" + gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" ) type Server struct { @@ -30,7 +24,6 @@ func New(addr string) *Server { srv := &Server{ Ctx: context.Background(), Grpc: grpc.NewServer(), - Mux: gwRuntime.NewServeMux(gwRuntime.WithForwardResponseRewriter(responseEnvelope)), grpcConns: make(map[string]*grpc.ClientConn), }