-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: allow setting custom transformer function as option #49
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
99cc672
to
168c27d
Compare
use ./examples | ||
use ( | ||
./examples | ||
. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the main module was required for me to properly run the example kuadrant in debug mode as otherwise it was not able to find the main module packages for adding break points
func Restructure[T any](obj any) (any, error) { | ||
return TransformFunc[T]()(obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably redundant if we choose to just use TransformFunc
everywhere.
Not sure do we want to keep this in general
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idiomatic symmetry of having Restructure
and Destruct
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed 👍
Signed-off-by: KevFan <[email protected]>
Description
Closes: #40
Allows option to enhance/extend the default transformation applied by watchers when listing objects