From 249baa2c729d9c9d0210fb35c4e70442eb49a41d Mon Sep 17 00:00:00 2001 From: Farhan Date: Sun, 3 Feb 2019 13:28:57 +0530 Subject: [PATCH] using constants for sharditeratortype instead of string literals --- consumer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumer.go b/consumer.go index ec3ab7d..f16dcf4 100644 --- a/consumer.go +++ b/consumer.go @@ -72,7 +72,7 @@ func New(streamName string, opts ...Option) (*Consumer, error) { // new consumer with no-op checkpoint, counter, and logger c := &Consumer{ streamName: streamName, - initialShardIteratorType: "TRIM_HORIZON", + initialShardIteratorType: kinesis.ShardIteratorTypeTrimHorizon, checkpoint: &noopCheckpoint{}, counter: &noopCounter{}, logger: &noopLogger{ @@ -280,7 +280,7 @@ func (c *Consumer) getShardIterator(streamName, shardID, lastSeqNum string) (*st } if lastSeqNum != "" { - params.ShardIteratorType = aws.String("AFTER_SEQUENCE_NUMBER") + params.ShardIteratorType = aws.String(kinesis.ShardIteratorTypeAfterSequenceNumber) params.StartingSequenceNumber = aws.String(lastSeqNum) } else { params.ShardIteratorType = aws.String(c.initialShardIteratorType)