Skip to content

Commit 089446d

Browse files
committed
style: enable golines and format all files with it
1 parent de9728f commit 089446d

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

internal/cloudwatchlogs/cloudwatchlogs.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ var NewFromConfig = cloudwatchlogs.NewFromConfig
1919
// cutoff is a Unix time in milliseconds.
2020
//
2121
// Doesn't perform pagination, returns all log streams in one slice.
22-
func DescribeLogStreamsUntilCutoff(ctx context.Context, client *cloudwatchlogs.Client, logGroupName string, cutoff int64) ([]types.LogStream, error) {
22+
func DescribeLogStreamsUntilCutoff(
23+
ctx context.Context,
24+
client *cloudwatchlogs.Client,
25+
logGroupName string,
26+
cutoff int64,
27+
) ([]types.LogStream, error) {
2328
var nextToken *string
2429
var logStreams []types.LogStream
2530

@@ -63,7 +68,11 @@ Outer:
6368
// CopyLogStream copies log events from the source log stream to the destination log stream.
6469
//
6570
// The dstGroup must already exist, the dstStream will be created by this function.
66-
func CopyLogStream(ctx context.Context, client *cloudwatchlogs.Client, srcGroup, srcStream, dstGroup, dstStream string) error {
71+
func CopyLogStream(
72+
ctx context.Context,
73+
client *cloudwatchlogs.Client,
74+
srcGroup, srcStream, dstGroup, dstStream string,
75+
) error {
6776
_, err := client.CreateLogStream(ctx, &cloudwatchlogs.CreateLogStreamInput{
6877
LogGroupName: aws.String(dstGroup),
6978
LogStreamName: aws.String(dstStream),

internal/sample/rand_log_streams.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ import (
1111
"github.com/batovpasha/aws-cw-log-sampler/internal/cloudwatchlogs"
1212
)
1313

14-
func SampleByRandLogStreams(ctx context.Context, client *cloudwatchlogs.Client, cutoff int64, srcGroup, dstGroup string) error {
14+
func SampleByRandLogStreams(
15+
ctx context.Context,
16+
client *cloudwatchlogs.Client,
17+
cutoff int64,
18+
srcGroup, dstGroup string,
19+
) error {
1520
logStreams, err := cloudwatchlogs.DescribeLogStreamsUntilCutoff(ctx, client, srcGroup, cutoff)
1621
if err != nil {
1722
return fmt.Errorf("describe log streams: %w", err)

0 commit comments

Comments
 (0)