Skip to content

Commit

Permalink
Merge pull request #2 from martinbaillie/master
Browse files Browse the repository at this point in the history
Remove unused variable
  • Loading branch information
urakozz authored Oct 11, 2018
2 parents f275350 + 562fe6b commit 5b7f8b6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions stream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ import (
"errors"
"time"

"sync"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface"
"github.com/aws/aws-sdk-go/service/dynamodbstreams"
"sync"
"github.com/aws/aws-sdk-go/service/dynamodbstreams/dynamodbstreamsiface"
)

type StreamSubscriber struct {
dynamoSvc *dynamodb.DynamoDB
streamSvc *dynamodbstreams.DynamoDBStreams
dynamoSvc dynamodbiface.DynamoDBAPI
streamSvc dynamodbstreamsiface.DynamoDBStreamsAPI
table *string
ShardIteratorType *string
Limit *int64
}

func NewStreamSubscriber(
dynamoSvc *dynamodb.DynamoDB,
streamSvc *dynamodbstreams.DynamoDBStreams,
dynamoSvc dynamodbiface.DynamoDBAPI,
streamSvc dynamodbstreamsiface.DynamoDBStreamsAPI,
table string) *StreamSubscriber {
s := &StreamSubscriber{dynamoSvc: dynamoSvc, streamSvc: streamSvc, table: &table}
s.applyDefaults()
Expand Down Expand Up @@ -189,7 +192,7 @@ func (r *StreamSubscriber) findProperShardId(previousShardId *string) (shadrId *
return
}

for i, shard := range des.StreamDescription.Shards {
for _, shard := range des.StreamDescription.Shards {
shadrId = shard.ShardId
if shard.ParentShardId != nil && *shard.ParentShardId == *previousShardId {
return
Expand Down

0 comments on commit 5b7f8b6

Please sign in to comment.