protogen, encoding/jsonpb, encoding/textpb: rename packages
Rename encoding/*pb to follow the convention of prefixing package names
with 'proto':
google.golang.org/protobuf/encoding/protojson
google.golang.org/protobuf/encoding/prototext
Move protogen under a compiler/ directory, just in case we ever do add
more compiler-related packages.
google.golang.org/protobuf/compiler/protogen
Change-Id: I31010cb5cabcea8274fffcac468477b58b56e8eb
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/177178
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/cmd/protoc-gen-go/internal_gengo/main.go b/cmd/protoc-gen-go/internal_gengo/main.go
index 801590b..37bdc3d 100644
--- a/cmd/protoc-gen-go/internal_gengo/main.go
+++ b/cmd/protoc-gen-go/internal_gengo/main.go
@@ -16,9 +16,9 @@
"unicode"
"unicode/utf8"
+ "google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/internal/encoding/tag"
"google.golang.org/protobuf/internal/fieldnum"
- "google.golang.org/protobuf/protogen"
"google.golang.org/protobuf/reflect/protoreflect"
descriptorpb "google.golang.org/protobuf/types/descriptor"
@@ -711,7 +711,7 @@
return "// Deprecated: Do not use."
}
-// TODO: Remove this. This was added to aid jsonpb, but jsonpb does this work
+// TODO: Remove this. This was added to aid protojson, but protojson does this work
// through the use of protobuf reflection now.
func genWellKnownType(g *protogen.GeneratedFile, ptr string, ident protogen.GoIdent, desc protoreflect.Descriptor) {
if wellKnownTypes[desc.FullName()] {