Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use camel case name in SpecIdentifierField #51

Merged
merged 1 commit into from
May 3, 2021

Conversation

nmvk
Copy link
Member

@nmvk nmvk commented May 3, 2021

In crd.go.tpl template file field.Names.Camel is used this results in replicationGroupID to be used as spec param rather than replicationGroupId.

Updating this method to be consistent with crd.go.tpl and to unblock elasticache code generation.

Without fix

func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error {
	if identifier.NameOrID == nil {
		return ackerrors.MissingNameIdentifier
	}
	r.ko.Spec.ReplicationGroupId = identifier.NameOrID
	return nil
}

With fix

func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error {
	if identifier.NameOrID == nil {
		return ackerrors.MissingNameIdentifier
	}
	r.ko.Spec.ReplicationGroupID = identifier.NameOrID
	return nil
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

In `crd.go.tpl` `field.Names.Camel` is used this results
in `replicationGroupID` rather than `replicationGroupId`.

Updating this method to be consistent with `crd.go.tpl`
and to unblock elasticache code generation.
Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ack-bot
Copy link
Collaborator

ack-bot commented May 3, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jaypipes, nmvk

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jaypipes jaypipes merged commit 568d39e into aws-controllers-k8s:main May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants