-
Notifications
You must be signed in to change notification settings - Fork 109
Conversation
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.
Maybe to avoid name duplication, we can change RegisterFunction
to just accepts a Function
. Doing that we can remove all duplicate names on maps and on version
and database
registrations.
@ajnavarro the map provides an useful feature: ensuring function names are unique. If we transform it into a slice, we will lose that. |
@erizocosmico we could handle that in RegisterFunctions, right? (throwing an error or panicking) But it's just a suggestion to avoid in the future having some inconsistencies between the name used to register and the function name (now only used on errors). If it's worth it to keep the map, LGTM. |
Oh, you're right, we could panic on RegisterFunction |
How about this? |
Signed-off-by: kuba-- <kuba@sourced.tech>
@erizocosmico PTAL |
Signed-off-by: kuba-- kuba@sourced.tech
Partly fixes: #665
This PR passes a function name to the registry, so it can improve debugging and error messages.