Skip to content

Commit

Permalink
Fixing pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
atshaw43 committed Oct 27, 2022
1 parent 5252079 commit d424c31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lambda/sqs_message_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/aws/aws-lambda-go/events"
)

func IsSampled(sqsMessge *events.SQSMessage) bool {
func IsSampled(sqsMessge events.SQSMessage) bool {
value, ok := sqsMessge.Attributes["AWSTraceHeader"]

if !ok {
Expand Down
4 changes: 2 additions & 2 deletions lambda/sqs_message_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ func testTrue(t *testing.T, header string) {
var sqsMessage events.SQSMessage
sqsMessage.Attributes = make(map[string]string)
sqsMessage.Attributes["AWSTraceHeader"] = header
assert.True(t, IsSampled(&sqsMessage))
assert.True(t, IsSampled(sqsMessage))
}

func testFalse(t *testing.T, header string) {
var sqsMessage events.SQSMessage
sqsMessage.Attributes = make(map[string]string)
sqsMessage.Attributes["AWSTraceHeader"] = header
assert.False(t, IsSampled(&sqsMessage))
assert.False(t, IsSampled(sqsMessage))
}

0 comments on commit d424c31

Please sign in to comment.