Skip to content

Commit

Permalink
Reverted files based on Pull Request comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
lzandman committed Oct 16, 2024
1 parent 89d2f74 commit d34f77d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions builder/azure/chroot/shared_image_gallery_destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type SharedImageGalleryDestination struct {

TargetRegions []TargetRegion `mapstructure:"target_regions"`
ExcludeFromLatest bool `mapstructure:"exclude_from_latest"`
ExcludeFromLatestTypo bool `mapstructure:"exclude_from_latest" undocumented:"true"`
ExcludeFromLatestTypo bool `mapstructure:"exlude_from_latest" undocumented:"true"`
}

// TargetRegion describes a region where the shared image should be replicated
Expand Down Expand Up @@ -67,7 +67,7 @@ func (sigd *SharedImageGalleryDestination) Validate(prefix string) (errs []error
}
if sigd.ExcludeFromLatestTypo == true && sigd.ExcludeFromLatest == false {
warns = append(warns,
fmt.Sprintf("%s.exclude_from_latest is being deprecated, please use exclude_from_latest", prefix))
fmt.Sprintf("%s.exlude_from_latest is being deprecated, please use exclude_from_latest", prefix))
sigd.ExcludeFromLatest = sigd.ExcludeFromLatestTypo
}
return
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions builder/azure/chroot/shared_image_gallery_destination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestSharedImageGalleryDestination_Validate(t *testing.T) {
wantWarns: []string{"sigdest.target_regions is empty; image will only be available in the region of the gallery"},
},
{
name: "warn if using exclude_from_latest",
name: "warn if using exlude_from_latest",
fields: fields{
ResourceGroup: "ResourceGroup",
GalleryName: "GalleryName",
Expand All @@ -91,7 +91,7 @@ func TestSharedImageGalleryDestination_Validate(t *testing.T) {
},
ExcludeFromLatestTypo: true,
},
wantWarns: []string{"sigdest.exclude_from_latest is being deprecated, please use exclude_from_latest"},
wantWarns: []string{"sigdest.exlude_from_latest is being deprecated, please use exclude_from_latest"},
},
{
name: "version format",
Expand Down

0 comments on commit d34f77d

Please sign in to comment.