Skip to content

Commit

Permalink
supress staticcheck warning
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Dec 6, 2021
1 parent 0ea347b commit 9a6c2eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xray/lambda_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ func TestBeginSubsegment_ForLambda(t *testing.T) {
ctx, td := NewTestDaemon(nil)
defer td.Close()

//lint:ignore SA1029 lambdaContextKey should be string because of compatibility with AWS Lambda for Go
// ref. https://github.com/aws/aws-lambda-go/blob/14da40f6fad9d5629abe069408b8ec278c36db75/lambda/function.go#L61
ctx = context.WithValue(ctx, lambdaContextKey, "Root=1-5e645f3e-1dfad076a177c5ccc5de12f5;Parent=03babb4ba280be51")
ctx, seg := BeginSubsegment(ctx, "subsegment")
_ = ctx // do something using ctx
Expand Down Expand Up @@ -48,6 +50,8 @@ func TestBeginSubsegment_ForLambda_Nested(t *testing.T) {
ctx, td := NewTestDaemon(nil)
defer td.Close()

//lint:ignore SA1029 lambdaContextKey should be string because of compatibility with AWS Lambda for Go
// ref. https://github.com/aws/aws-lambda-go/blob/14da40f6fad9d5629abe069408b8ec278c36db75/lambda/function.go#L61
ctx = context.WithValue(ctx, lambdaContextKey, "Root=1-5e645f3e-1dfad076a177c5ccc5de12f5;Parent=03babb4ba280be51")
ctx, seg0 := BeginSubsegment(ctx, "subsegment")
ctx, seg1 := BeginSubsegment(ctx, "sub-sub-segment")
Expand Down

0 comments on commit 9a6c2eb

Please sign in to comment.