From b249b458f149861d453da523ff5c23d0f4213621 Mon Sep 17 00:00:00 2001 From: Marcin Wyszynski Date: Fri, 13 Aug 2021 11:38:43 +0200 Subject: [PATCH] Remove duplication (#10) --- group.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/group.go b/group.go index 124887e..130b97d 100644 --- a/group.go +++ b/group.go @@ -100,21 +100,6 @@ func (g *groupImpl) create(ctx context.Context, streamName string) (*writerImpl, return nil, err } - description, err := g.DescribeLogStreamsWithContext(ctx, &cloudwatchlogs.DescribeLogStreamsInput{ - LogGroupName: aws.String(g.groupName), - LogStreamNamePrefix: aws.String(streamName), - }) - - if err != nil { - return nil, errors.Wrap(err, "couldn't get log stream description") - } - - if len(description.LogStreams) == 0 { - return nil, errors.Errorf("logs streams data missing for %s", streamName) - } - - ret.sequenceToken = description.LogStreams[0].UploadSequenceToken - return ret, nil }