compiler/protogen: export Plugin.FilesByPath

The Plugin.FileByName method seems like an unnecessary indirection that
provides little benefit over just exposing the map.
If the intention to provide some form of immutability, there are already
many leakages in the abstraction given that most things returned by
protogen is by pointer.

Change-Id: I0c793a8d7dab7632b92968a74f8c1ba5accb242f
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/191039
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/compiler/protogen/protogen_test.go b/compiler/protogen/protogen_test.go
index 4604ed1..51dbd25 100644
--- a/compiler/protogen/protogen_test.go
+++ b/compiler/protogen/protogen_test.go
@@ -186,7 +186,7 @@
 			t.Errorf("%vNew(req) = %v", context, err)
 			continue
 		}
-		gotFile, ok := gen.FileByName(filename)
+		gotFile, ok := gen.FilesByPath[filename]
 		if !ok {
 			t.Errorf("%v%v: missing file info", context, filename)
 			continue
@@ -223,7 +223,7 @@
 	if err != nil {
 		t.Fatalf("New(req) = %v", err)
 	}
-	if f1, ok := gen.FileByName("dir/file1.proto"); !ok {
+	if f1, ok := gen.FilesByPath["dir/file1.proto"]; !ok {
 		t.Errorf("missing file info for dir/file1.proto")
 	} else if f1.GoPackageName != "foo" {
 		t.Errorf("dir/file1.proto: GoPackageName=%v, want foo; package name should be derived from dir/file2.proto", f1.GoPackageName)