mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 22:33:34 +00:00
Fix Proto Generator to not assign types to packages they don't belong to
The wrong type assignment resulted in wrong imports
This commit is contained in:
parent
8f92b8e288
commit
958a9339a3
@ -116,7 +116,10 @@ func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global
|
||||
}
|
||||
return
|
||||
}
|
||||
global[t.Name] = p
|
||||
if t.Name.Package == p.PackagePath {
|
||||
// Associate types only to their own package
|
||||
global[t.Name] = p
|
||||
}
|
||||
if _, ok := local[t.Name]; ok {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user