Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Remove duplication (marcinwyszynski#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinwyszynski authored Aug 13, 2021
1 parent 8bb5d03 commit b249b45
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b249b45

Please sign in to comment.