Skip to content

fix: remove unlambda wrapper in pipeline template toFloat function#239

Merged
intel352 merged 2 commits intomainfrom
copilot/fix-linter-failures
Mar 3, 2026
Merged

fix: remove unlambda wrapper in pipeline template toFloat function#239
intel352 merged 2 commits intomainfrom
copilot/fix-linter-failures

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

golangci-lint reported a gocritic unlambda violation — a redundant wrapper lambda that simply delegates to an existing function.

Change

  • module/pipeline_template.go: Replace the unnecessary wrapper func(v any) float64 { return toFloat64(v) } with a direct reference to toFloat64
// Before
"toFloat": func(v any) float64 { return toFloat64(v) },

// After
"toFloat": toFloat64,

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix linter failures in the codebase fix: remove unlambda wrapper in pipeline template toFloat function Mar 3, 2026
@intel352 intel352 marked this pull request as ready for review March 3, 2026 17:13
Copilot AI review requested due to automatic review settings March 3, 2026 17:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes a redundant wrapper lambda in the pipeline template function map to satisfy golangci-lint (gocritic unlambda) while keeping template behavior unchanged.

Changes:

  • Replace "toFloat": func(v any) float64 { return toFloat64(v) } with "toFloat": toFloat64 in the template FuncMap.

@intel352 intel352 merged commit b97a857 into main Mar 3, 2026
18 checks passed
@intel352 intel352 deleted the copilot/fix-linter-failures branch March 3, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants