-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Description
Is your feature request related to a problem? Please describe.
Not a problem, just adhering to clean code practices.
In my previous PR, I created a reusable ToPtr in utils package using golang generics in pkg/utils/utils.go directory. However, I noticed there is another ptr function that does the same thing in random directories:
apis/fluentbit/v1alpha2/filter_types_test.goapis/fluentbit/v1alpha2/plugins/output/influxdb_types_test.go
and many different test files are relying on this function. It's a better practice to use this generic function from utils package that is to be shared by all other files from different packages.
Describe the solution you'd like
Refactor existing test files to use utils.ToPtr from the utils package, replacing all local ptr helper definitions.
Additional context
This will reduce code duplication and improve maintainability across test files.
Metadata
Metadata
Assignees
Labels
No labels