encoding: remove jsonpb and textpb

Change-Id: Id057d697efecedb00bc07705a47cddb2d69866e9
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/177603
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Joe Tsai 2019-05-16 12:14:20 -07:00 committed by Damien Neil
parent 0cf31136c7
commit 838f1f50f9
6 changed files with 6 additions and 40 deletions

View File

@ -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
)

View File

@ -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
)

View File

@ -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
)

View File

@ -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
)

2
go.mod
View File

@ -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
)

4
go.sum
View File

@ -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=