diff --git a/hack/generator/pkg/astmodel/storage_conversion_factories.go b/hack/generator/pkg/astmodel/storage_conversion_factories.go index 81ba97c8090..f0203801a18 100644 --- a/hack/generator/pkg/astmodel/storage_conversion_factories.go +++ b/hack/generator/pkg/astmodel/storage_conversion_factories.go @@ -840,7 +840,7 @@ func assignObjectTypeFromObjectType( localId := dst.NewIdent(copyVar) errLocal := dst.NewIdent("err") - errorsPackageName := generationContext.MustGetImportedPackageName(ErrorsReference) + errorsPackageName := generationContext.MustGetImportedPackageName(APIMachineryErrorsReference) declaration := astbuilder.LocalVariableDeclaration(copyVar, createTypeDeclaration(destinationName, generationContext), "") diff --git a/hack/generator/pkg/astmodel/storage_conversion_function.go b/hack/generator/pkg/astmodel/storage_conversion_function.go index 7e3d4d6de34..61e9ed3caa6 100644 --- a/hack/generator/pkg/astmodel/storage_conversion_function.go +++ b/hack/generator/pkg/astmodel/storage_conversion_function.go @@ -118,7 +118,7 @@ func (fn *StorageConversionFunction) Name() string { // RequiredPackageReferences returns the set of package references required by this function func (fn *StorageConversionFunction) RequiredPackageReferences() *PackageReferenceSet { result := NewPackageReferenceSet( - ErrorsReference, + APIMachineryErrorsReference, fn.otherDefinition.Name().PackageReference) return result