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

Provided cell.DecodeHooks should be executed before the default hooks #36

Open
chancez opened this issue Jan 24, 2025 · 0 comments
Open

Comments

@chancez
Copy link

chancez commented Jan 24, 2025

Hooks provided via the options.DecodeHooks are called after the default hooks ref. I think the hooks provided should be executed first, so that the users have the option to bypass the default hook behavior. Currently, you cannot override the fixupStringSliceHookFunc or other default hooks behavior because they run before any custom hooks. Fixing this just means swapping the order of the append call linked.

#35 is related but still a separate issue. It would allow you to bypass the problem by implementing a custom unmarshal hook for your type, but if you wanted to override the string slice conversion behavior entirely, it's still not possible today. I don't think cilium needs this particular functionality now that things are relying on that behavior, but other users of the hive module might want the ability to override the default hooks.

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

No branches or pull requests

1 participant