Skip to content

Cleanup: Remove unnecessary wrapper in log-streams actions #89

@yimsk

Description

@yimsk

Summary

Remove unnecessary 1-line wrapper function in log-streams actions for consistency with log-groups.

Current Code

custom/cloudwatch/log-streams/actions.go:37-39

func getCloudWatchLogsClient(ctx context.Context) (*cloudwatchlogs.Client, error) {
    return cwClient.GetLogsClient(ctx)  // Just passes through
}

Called only once on line 47:

client, err := getCloudWatchLogsClient(ctx)

Proposed Change

Replace with direct call (matches log-groups pattern):

client, err := cwClient.GetLogsClient(ctx)

Why

  • Single-use wrapper adds no value
  • Inconsistent with custom/cloudwatch/log-groups/actions.go which calls directly
  • 3 lines of dead code

Impact

  • Lines removed: 3
  • Files changed: 1
  • Risk: None (behavior unchanged)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions