File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -204,15 +204,21 @@ func (g *generator) commit(fileName, pkgName string) int {
204204 fmt .Fprintf (& header , "package %s\n \n " , pkgName )
205205
206206 var imps []pbinfo.ImportSpec
207+ dupCheck := map [string ]bool {}
207208 for imp := range g .imports {
208209 // TODO(codyoss): This if can be removed once the public protos
209210 // have been migrated to their new package. This should be soon after this
210211 // code is merged.
211- if imp .Path == "google.golang.org/genproto/googleapis/longrunning" ||
212- imp .Path == "google.golang.org/genproto/googleapis/iam/v1" {
213- continue
212+ if imp .Path == "google.golang.org/genproto/googleapis/longrunning" {
213+ imp .Path = "cloud.google.com/go/longrunning/autogen/longrunningpb"
214+ }
215+ if imp .Path == "google.golang.org/genproto/googleapis/iam/v1" {
216+ imp .Path = "cloud.google.com/go/iam/apiv1/iampb"
217+ }
218+ if exists := dupCheck [imp .Path ]; ! exists {
219+ dupCheck [imp .Path ] = true
220+ imps = append (imps , imp )
214221 }
215- imps = append (imps , imp )
216222 }
217223 impDiv := sortImports (imps )
218224
You can’t perform that action at this time.
0 commit comments