Skip to content

Commit

Permalink
Merge pull request #1694 from haooliveira84/fix-sqs-lint
Browse files Browse the repository at this point in the history
fix(sqs): adjust lint; remove unnecessary conversion
  • Loading branch information
Christopher Haar committed Mar 8, 2023
2 parents 04858ec + eb79747 commit 7536322
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apis/sqs/v1beta1/queue_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ type QueueParameters struct {
// +optional
ContentBasedDeduplication *bool `json:"contentBasedDeduplication,omitempty"`

//Boolean to enable server-side encryption (SSE) of
//message content with SQS-owned encryption keys. See Encryption at rest.
// Boolean to enable server-side encryption (SSE) of
// message content with SQS-owned encryption keys. See Encryption at rest.
SqsManagedSseEnabled *bool `json:"sseEnabled,omitempty"`

// Tags add cost allocation tags to the specified Amazon SQS queue.
Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/sqs/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func LateInitialize(in *v1beta1.QueueParameters, attributes map[string]string, t
in.VisibilityTimeout = awsclients.LateInitializeInt64Ptr(in.VisibilityTimeout, int64Ptr(attributes[v1beta1.AttributeVisibilityTimeout]))

in.SqsManagedSseEnabled = nil
SqsManagedSseEnabled, err := strconv.ParseBool(attributes[string(attributes[v1beta1.AttributeSqsManagedSseEnabled])])
SqsManagedSseEnabled, err := strconv.ParseBool(attributes[v1beta1.AttributeSqsManagedSseEnabled])
if err == nil && SqsManagedSseEnabled {
in.SqsManagedSseEnabled = awsclients.LateInitializeBoolPtr(in.SqsManagedSseEnabled, aws.Bool(SqsManagedSseEnabled))
}
Expand Down

0 comments on commit 7536322

Please sign in to comment.