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
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-39Called only once on line 47:
Proposed Change
Replace with direct call (matches log-groups pattern):
Why
custom/cloudwatch/log-groups/actions.gowhich calls directlyImpact
Related