mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Slice conversion requires destination package
This commit is contained in:
parent
977854b8de
commit
173718059d
@ -235,6 +235,8 @@ func (g *conversionGenerator) generateConversionsForMap(inType, outType reflect.
|
||||
func (g *conversionGenerator) generateConversionsForSlice(inType, outType reflect.Type) error {
|
||||
inElem := inType.Elem()
|
||||
outElem := outType.Elem()
|
||||
// slice conversion requires the package for the destination type in order to instantiate the map
|
||||
g.addImportByPath(outElem.PkgPath())
|
||||
if err := g.generateConversionsBetween(inElem, outElem); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user