Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix function typo #4269

Merged
merged 1 commit into from
Sep 19, 2023
Merged

chore: fix function typo #4269

merged 1 commit into from
Sep 19, 2023

Conversation

JanDeDobbeleer
Copy link
Owner

@JanDeDobbeleer JanDeDobbeleer commented Sep 19, 2023

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added/updated (for bug fixes / features).

Description

🤖 Generated by Copilot at ef66d0a

This pull request replaces the use of interface{} with a type alias any in various places in the codebase, to simplify the code and avoid importing conflicts. It also refactors some type conversion functions in the template package and fixes some minor typos and formatting issues in the tests. The affected files are mostly in the src directory, and include config.go, migrate.go, migrate_test.go, shell.go, map.go, map_test.go, path_test.go, scm_test.go, compare.go, compare_test.go, list.go, segment.go, oauth_test.go, request_test.go, battery_openbsd.go, battery_openbsd_test.go, az.go, withings.go, func_map.go, and round.go.

How

🤖 Generated by Copilot at ef66d0a

  • Replace interface{} type with any type alias for consistency and simplicity (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Define any type alias as interface{} in src/engine/config.go (link)
  • Replace interFaceToInt and interfaceToFloat64 functions with toIntOrZero and toFloat64 functions in src/template/compare.go to avoid code duplication and use consistent functions (link, link)
  • Move toIntOrZero and toInt functions from src/engine/config.go to src/template/compare.go (link, link)
  • Remove unused imports from src/template/round.go (link)
  • Fix typo in ExpectedPercentage field type in src/platform/battery/battery_openbsd_test.go (link)
  • Fix indentation of StatusOutput fields in src/platform/battery/battery_openbsd_test.go (link, link, link, link, link)
  • Remove trailing whitespace in src/platform/battery/battery_openbsd.go (link)

@JanDeDobbeleer JanDeDobbeleer enabled auto-merge (rebase) September 19, 2023 17:29
@JanDeDobbeleer JanDeDobbeleer merged commit 35c2588 into main Sep 19, 2023
@JanDeDobbeleer JanDeDobbeleer deleted the typo branch September 19, 2023 17:35
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.

1 participant