@@ -26,12 +26,7 @@ func (p *ConnectEsProto) Name() string {
2626// Configure implements part of the Plugin interface.
2727func (p * ConnectEsProto ) Configure (ctx * protoc.PluginContext ) * protoc.PluginConfiguration {
2828 flags := parseConnectEsProtoOptions (p .Name (), ctx .PluginConfig .GetFlags ())
29- imports := make (map [string ]bool )
30- for _ , file := range ctx .ProtoLibrary .Files () {
31- for _ , imp := range file .Imports () {
32- imports [imp .Filename ] = true
33- }
34- }
29+
3530 // TODO: get target option from directive
3631 var options = []string {"keep_empty_files=true" , "target=ts" }
3732 tsFiles := make ([]string , 0 )
@@ -55,16 +50,17 @@ func (p *ConnectEsProto) Configure(ctx *protoc.PluginContext) *protoc.PluginConf
5550 if len (pc .Outputs ) == 0 {
5651 pc .Outputs = nil
5752 }
53+
5854 return pc
5955}
6056
61- // ConnectEsProtoOptions represents the parsed flag configuration for the
57+ // connectEsProtoOptions represents the parsed flag configuration for the
6258// ConnectEsProto implementation.
63- type ConnectEsProtoOptions struct {
59+ type connectEsProtoOptions struct {
6460 excludeOutput map [string ]bool
6561}
6662
67- func parseConnectEsProtoOptions (kindName string , args []string ) * ConnectEsProtoOptions {
63+ func parseConnectEsProtoOptions (kindName string , args []string ) * connectEsProtoOptions {
6864 flags := flag .NewFlagSet (kindName , flag .ExitOnError )
6965
7066 var excludeOutput string
@@ -73,7 +69,7 @@ func parseConnectEsProtoOptions(kindName string, args []string) *ConnectEsProtoO
7369 if err := flags .Parse (args ); err != nil {
7470 log .Fatalf ("failed to parse flags for %q: %v" , kindName , err )
7571 }
76- config := & ConnectEsProtoOptions {
72+ config := & connectEsProtoOptions {
7773 excludeOutput : make (map [string ]bool ),
7874 }
7975 for _ , value := range strings .Split (excludeOutput , "," ) {
0 commit comments