From 838f1f50f9e8dc425c25fe2519ae4b926ac2fd32 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Thu, 16 May 2019 12:14:20 -0700 Subject: [PATCH] encoding: remove jsonpb and textpb Change-Id: Id057d697efecedb00bc07705a47cddb2d69866e9 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/177603 Reviewed-by: Damien Neil --- cmd/protoc-gen-go-grpc/testdata/go.mod | 2 +- cmd/protoc-gen-go/testdata/go.mod | 2 +- encoding/jsonpb/jsonpb.go | 18 ------------------ encoding/textpb/textpb.go | 18 ------------------ go.mod | 2 +- go.sum | 4 +++- 6 files changed, 6 insertions(+), 40 deletions(-) delete mode 100644 encoding/jsonpb/jsonpb.go delete mode 100644 encoding/textpb/textpb.go diff --git a/cmd/protoc-gen-go-grpc/testdata/go.mod b/cmd/protoc-gen-go-grpc/testdata/go.mod index 96f5c50a..f0260ae9 100644 --- a/cmd/protoc-gen-go-grpc/testdata/go.mod +++ b/cmd/protoc-gen-go-grpc/testdata/go.mod @@ -1,7 +1,7 @@ module google.golang.org/protobuf/cmd/protoc-gen-go-grpc/testdata require ( - github.com/golang/protobuf v1.2.1-0.20190514181236-7800af189d76 + github.com/golang/protobuf v1.2.1-0.20190515194842-7574ba03306e google.golang.org/grpc v1.19.0 google.golang.org/protobuf v1.0.0 ) diff --git a/cmd/protoc-gen-go/testdata/go.mod b/cmd/protoc-gen-go/testdata/go.mod index bc6ec725..7d3dea13 100644 --- a/cmd/protoc-gen-go/testdata/go.mod +++ b/cmd/protoc-gen-go/testdata/go.mod @@ -1,7 +1,7 @@ module google.golang.org/protobuf/cmd/protoc-gen-go/testdata require ( - github.com/golang/protobuf v1.2.1-0.20190514181236-7800af189d76 + github.com/golang/protobuf v1.2.1-0.20190515194842-7574ba03306e google.golang.org/protobuf v1.0.0 ) diff --git a/encoding/jsonpb/jsonpb.go b/encoding/jsonpb/jsonpb.go deleted file mode 100644 index 4cf24d67..00000000 --- a/encoding/jsonpb/jsonpb.go +++ /dev/null @@ -1,18 +0,0 @@ -// Package jsonpb is deprecated. -package jsonpb - -import ( - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -var Marshal = protojson.Marshal - -func Unmarshal(m proto.Message, b []byte) error { - return protojson.Unmarshal(b, m) -} - -type ( - MarshalOptions = protojson.MarshalOptions - UnmarshalOptions = protojson.UnmarshalOptions -) diff --git a/encoding/textpb/textpb.go b/encoding/textpb/textpb.go deleted file mode 100644 index 2c54d659..00000000 --- a/encoding/textpb/textpb.go +++ /dev/null @@ -1,18 +0,0 @@ -// Package textpb is deprecated. -package textpb - -import ( - "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/proto" -) - -var Marshal = prototext.Marshal - -func Unmarshal(m proto.Message, b []byte) error { - return prototext.Unmarshal(b, m) -} - -type ( - MarshalOptions = prototext.MarshalOptions - UnmarshalOptions = prototext.UnmarshalOptions -) diff --git a/go.mod b/go.mod index 25d8ea0e..00d591f2 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module google.golang.org/protobuf go 1.9 require ( - github.com/golang/protobuf v1.2.1-0.20190514181236-7800af189d76 + github.com/golang/protobuf v1.2.1-0.20190515194842-7574ba03306e github.com/google/go-cmp v0.3.0 ) diff --git a/go.sum b/go.sum index 3384781e..8181df41 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ -github.com/golang/protobuf v1.2.1-0.20190514181236-7800af189d76 h1:V0/EhMNrdv06pDVp7kn2tsFO8WE9T3zJamTPeb4QgLg= github.com/golang/protobuf v1.2.1-0.20190514181236-7800af189d76/go.mod h1:Zfz6qcDoDBESdv6JsKsGpgNHnkvwJAJwcA9eL+mOkgc= +github.com/golang/protobuf v1.2.1-0.20190515194842-7574ba03306e h1:wrd8ZnV3RJvrouZgfP+s3ZcAkX6J1PbrVFWchWHUz90= +github.com/golang/protobuf v1.2.1-0.20190515194842-7574ba03306e/go.mod h1:GjgUz9uwrRQmdPBBrFqiVbojAmlpy6ryM6DCzC+20rE= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= google.golang.org/protobuf v0.0.0-20190514172829-e89e6244e0e8/go.mod h1:791zQGC15vDqjpmPRn1uGPu5oHy/Jzw/Q1n5JsgIIcY= +google.golang.org/protobuf v0.0.0-20190514231807-cdb777356907/go.mod h1:HeRLsKXv4+wE27dOIGwnqcOgq6a1O/GJ7mGhiEPnBrU=