go.mod: rename google.golang.org/proto as github.com/golang/protobuf/v2
This change was created by running:
git ls-files | xargs sed -i "s|google.golang.org/proto|github.com/golang/protobuf/v2|g"
This change is *not* an endorsement of "github.com/golang/protobuf/v2" as the
final import path when the v2 API is eventually released as stable.
We continue to reserve the right to make breaking changes as we see fit.
This change enables us to host the v2 API on a repository that is go-gettable
(since go.googlesource.com is not a known host by the "go get" tool;
and google.golang.org/proto was just a stub URL that is not currently served).
Thus, we can start work on a forked version of the v1 API that explores
what it would take to implement v1 in terms of v2 in a backwards compatible way.
Change-Id: Ia3ebc41ac4238af62ee140200d3158b53ac9ec48
Reviewed-on: https://go-review.googlesource.com/136736
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/encoding/json/decode.go b/internal/encoding/json/decode.go
index 4f7ddb6..769619b 100644
--- a/internal/encoding/json/decode.go
+++ b/internal/encoding/json/decode.go
@@ -10,7 +10,7 @@
"regexp"
"unicode/utf8"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
type syntaxError struct{ error }
diff --git a/internal/encoding/json/encode.go b/internal/encoding/json/encode.go
index aea7753..93b0928 100644
--- a/internal/encoding/json/encode.go
+++ b/internal/encoding/json/encode.go
@@ -7,7 +7,7 @@
import (
"strings"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
// Marshal serializes v as the JSON format.
diff --git a/internal/encoding/json/number.go b/internal/encoding/json/number.go
index 7d27553..ec99cbd 100644
--- a/internal/encoding/json/number.go
+++ b/internal/encoding/json/number.go
@@ -10,7 +10,7 @@
"regexp"
"strconv"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
// marshalNumber encodes v as a Number.
diff --git a/internal/encoding/json/string.go b/internal/encoding/json/string.go
index ad80e85..813d8fa 100644
--- a/internal/encoding/json/string.go
+++ b/internal/encoding/json/string.go
@@ -12,7 +12,7 @@
"unicode/utf16"
"unicode/utf8"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
func (p *encoder) marshalString(v Value) error {
diff --git a/internal/encoding/pack/pack.go b/internal/encoding/pack/pack.go
index aeb3390..93dc4ed 100644
--- a/internal/encoding/pack/pack.go
+++ b/internal/encoding/pack/pack.go
@@ -21,8 +21,8 @@
"unicode"
"unicode/utf8"
- "google.golang.org/proto/internal/encoding/wire"
- "google.golang.org/proto/reflect/protoreflect"
+ "github.com/golang/protobuf/v2/internal/encoding/wire"
+ "github.com/golang/protobuf/v2/reflect/protoreflect"
)
// Number is the field number; aliased from the wire package for convenience.
diff --git a/internal/encoding/pack/pack_test.go b/internal/encoding/pack/pack_test.go
index 36a6300..293dcdb 100644
--- a/internal/encoding/pack/pack_test.go
+++ b/internal/encoding/pack/pack_test.go
@@ -11,9 +11,9 @@
"math"
"testing"
+ pref "github.com/golang/protobuf/v2/reflect/protoreflect"
+ ptype "github.com/golang/protobuf/v2/reflect/prototype"
"github.com/google/go-cmp/cmp"
- pref "google.golang.org/proto/reflect/protoreflect"
- ptype "google.golang.org/proto/reflect/prototype"
)
var msgDesc = func() pref.MessageDescriptor {
diff --git a/internal/encoding/text/decode.go b/internal/encoding/text/decode.go
index 90faedc..090177a 100644
--- a/internal/encoding/text/decode.go
+++ b/internal/encoding/text/decode.go
@@ -10,8 +10,8 @@
"regexp"
"unicode/utf8"
- "google.golang.org/proto/internal/errors"
- "google.golang.org/proto/reflect/protoreflect"
+ "github.com/golang/protobuf/v2/internal/errors"
+ "github.com/golang/protobuf/v2/reflect/protoreflect"
)
type syntaxError struct{ error }
diff --git a/internal/encoding/text/encode.go b/internal/encoding/text/encode.go
index ea0fb5a..1eae1f3 100644
--- a/internal/encoding/text/encode.go
+++ b/internal/encoding/text/encode.go
@@ -8,7 +8,7 @@
"bytes"
"strings"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
// Marshal serializes v as the proto text format, where v must be a Message.
diff --git a/internal/encoding/text/number.go b/internal/encoding/text/number.go
index 7a1be93..8a79f49 100644
--- a/internal/encoding/text/number.go
+++ b/internal/encoding/text/number.go
@@ -12,7 +12,7 @@
"strconv"
"strings"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
// marshalNumber encodes v as either a Bool, Int, Uint, or Float.
diff --git a/internal/encoding/text/string.go b/internal/encoding/text/string.go
index cc83e85..0274295 100644
--- a/internal/encoding/text/string.go
+++ b/internal/encoding/text/string.go
@@ -15,7 +15,7 @@
"unicode/utf16"
"unicode/utf8"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
func (p *encoder) marshalString(v Value) error {
diff --git a/internal/encoding/text/text_test.go b/internal/encoding/text/text_test.go
index 9b3bff6..b5ca63c 100644
--- a/internal/encoding/text/text_test.go
+++ b/internal/encoding/text/text_test.go
@@ -11,10 +11,10 @@
"testing"
"unicode/utf8"
+ "github.com/golang/protobuf/v2/internal/flags"
+ "github.com/golang/protobuf/v2/reflect/protoreflect"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "google.golang.org/proto/internal/flags"
- "google.golang.org/proto/reflect/protoreflect"
)
func Test(t *testing.T) {
diff --git a/internal/encoding/text/value.go b/internal/encoding/text/value.go
index 8dddd78..d16d1ab 100644
--- a/internal/encoding/text/value.go
+++ b/internal/encoding/text/value.go
@@ -33,8 +33,8 @@
"math"
"strings"
- "google.golang.org/proto/internal/flags"
- "google.golang.org/proto/reflect/protoreflect"
+ "github.com/golang/protobuf/v2/internal/flags"
+ "github.com/golang/protobuf/v2/reflect/protoreflect"
)
// Type represents a type expressible in the text format.
diff --git a/internal/encoding/wire/wire.go b/internal/encoding/wire/wire.go
index 3ac9c91..033b4c0 100644
--- a/internal/encoding/wire/wire.go
+++ b/internal/encoding/wire/wire.go
@@ -11,7 +11,7 @@
"io"
"math/bits"
- "google.golang.org/proto/internal/errors"
+ "github.com/golang/protobuf/v2/internal/errors"
)
// Number represents the field number.