Skip to content

Commit

Permalink
Fix error package references
Browse files Browse the repository at this point in the history
  • Loading branch information
theunrepentantgeek committed May 26, 2021
1 parent 8d109ad commit a2f32fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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), "")

Expand Down
2 changes: 1 addition & 1 deletion hack/generator/pkg/astmodel/storage_conversion_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2f32fa

Please sign in to comment.