Ver Fonte

移除错误包调用

dcsunny há 4 anos atrás
pai
commit
bed552cb83
2 ficheiros alterados com 3 adições e 7 exclusões
  1. 0 1
      go.mod
  2. 3 6
      http/handle.go

+ 0 - 1
go.mod

@@ -4,5 +4,4 @@ go 1.16
 
 require (
 	github.com/go-kratos/kratos/v2 v2.0.0-beta2
-	google.golang.org/grpc v1.36.0
 )

+ 3 - 6
http/handle.go

@@ -5,14 +5,11 @@ import (
 	"net/http"
 	"strings"
 
-	"github.com/go-kratos/kratos/v2/errors"
-
+	"github.com/go-kratos/kratos/v2/encoding"
 	"github.com/go-kratos/kratos/v2/encoding/json"
-	"google.golang.org/grpc/encoding"
+	"github.com/go-kratos/kratos/v2/errors"
 
-	// init encoding
-	_ "google.golang.org/grpc/encoding/gzip"
-	_ "google.golang.org/grpc/encoding/proto"
+	_ "github.com/go-kratos/kratos/v2/transport"
 )
 
 func ErrHandle(w http.ResponseWriter, r *http.Request, err error) {