Skip to content

Commit 7574ba0

Browse files
committed
all: update import paths for renamed packages
Update paths to packages renamed in https://go-review.googlesource.com/c/protobuf/+/177178 Change-Id: Ifd43f4edd0c976e9ec84b145cdaf331b42fa6e53 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/177400 Reviewed-by: Herbie Ong <[email protected]>
1 parent 7800af1 commit 7574ba0

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/golang/protobuf
22

33
go 1.9
44

5-
require google.golang.org/protobuf v0.0.0-20190514172829-e89e6244e0e8
5+
require google.golang.org/protobuf v0.0.0-20190514231807-cdb777356907

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
github.com/golang/protobuf v1.2.1-0.20190514181236-7800af189d76/go.mod h1:Zfz6qcDoDBESdv6JsKsGpgNHnkvwJAJwcA9eL+mOkgc=
2+
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
13
google.golang.org/protobuf v0.0.0-20190514172829-e89e6244e0e8 h1:W21IHLlUZTOSWPAugb7YF/zA4lu4QlPm7T5JwlKYstQ=
24
google.golang.org/protobuf v0.0.0-20190514172829-e89e6244e0e8/go.mod h1:791zQGC15vDqjpmPRn1uGPu5oHy/Jzw/Q1n5JsgIIcY=
5+
google.golang.org/protobuf v0.0.0-20190514231807-cdb777356907 h1:KmA4pf+bs1ucZ/8YCj/VXK0/mkK1olh/jzYhKYiebFE=
6+
google.golang.org/protobuf v0.0.0-20190514231807-cdb777356907/go.mod h1:HeRLsKXv4+wE27dOIGwnqcOgq6a1O/GJ7mGhiEPnBrU=

internal/cmd/generate-alias/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
"github.com/golang/protobuf/proto"
2020
gengo "google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo"
21-
"google.golang.org/protobuf/protogen"
21+
"google.golang.org/protobuf/compiler/protogen"
2222
"google.golang.org/protobuf/reflect/protodesc"
2323
"google.golang.org/protobuf/reflect/protoreflect"
2424

internal/proto/text.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"io"
1313
"reflect"
1414

15-
"google.golang.org/protobuf/encoding/textpb"
15+
"google.golang.org/protobuf/encoding/prototext"
1616
preg "google.golang.org/protobuf/reflect/protoregistry"
1717
"google.golang.org/protobuf/runtime/protoimpl"
1818
)
@@ -49,7 +49,7 @@ func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error {
4949
if !tm.Compact {
5050
ind = " "
5151
}
52-
mo := textpb.MarshalOptions{
52+
mo := prototext.MarshalOptions{
5353
AllowPartial: true,
5454
Indent: ind,
5555
}
@@ -101,7 +101,7 @@ func UnmarshalText(s string, m Message) error {
101101
if um, ok := m.(encoding.TextUnmarshaler); ok {
102102
return um.UnmarshalText([]byte(s))
103103
}
104-
err := textpb.Unmarshal(protoimpl.X.MessageOf(m).Interface(), []byte(s))
104+
err := prototext.Unmarshal([]byte(s), protoimpl.X.MessageOf(m).Interface())
105105
// Return RequiredNotSetError for required not set errors and ignore invalid
106106
// UTF-8 errors.
107107
mask := nonFatalErrors(err)

protoc-gen-go/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
gengogrpc "google.golang.org/protobuf/cmd/protoc-gen-go-grpc/internal_gengogrpc"
2828
gengo "google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo"
29-
"google.golang.org/protobuf/protogen"
29+
"google.golang.org/protobuf/compiler/protogen"
3030
)
3131

3232
func main() {

0 commit comments

Comments
 (0)