Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
🤖 Generated by Copilot at ef66d0a
This pull request replaces the use of
interface{}
with a type aliasany
in various places in the codebase, to simplify the code and avoid importing conflicts. It also refactors some type conversion functions in thetemplate
package and fixes some minor typos and formatting issues in the tests. The affected files are mostly in thesrc
directory, and includeconfig.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
, andround.go
.How
🤖 Generated by Copilot at ef66d0a
interface{}
type withany
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)any
type alias asinterface{}
insrc/engine/config.go
(link)interFaceToInt
andinterfaceToFloat64
functions withtoIntOrZero
andtoFloat64
functions insrc/template/compare.go
to avoid code duplication and use consistent functions (link, link)toIntOrZero
andtoInt
functions fromsrc/engine/config.go
tosrc/template/compare.go
(link, link)src/template/round.go
(link)ExpectedPercentage
field type insrc/platform/battery/battery_openbsd_test.go
(link)StatusOutput
fields insrc/platform/battery/battery_openbsd_test.go
(link, link, link, link, link)src/platform/battery/battery_openbsd.go
(link)