-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use error message const to avoid replication. #2502
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.
I think the change has to reach the error messages file.
As @rabbah (I believe) is indicating... and specifically the translated map:
|
Specifically the id in the translation file should be a well known constant, like
|
Seems doesn't work like that, @mdeuser , could you please help take a review? |
tools/cli/go-whisk/whisk/wskerror.go
Outdated
@@ -34,6 +34,7 @@ const NO_DISPLAY_PREFIX bool = false | |||
const APPLICATION_ERR bool = true | |||
const NO_APPLICATION_ERR bool = false | |||
const TIMED_OUT bool = true | |||
const UNABLE_CREATE_ACTION_ERR string = "Unable to create action '{{.name}}': {{.err}}" |
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 needs to be
const UNABLE_CREATE_ACTION_ERR string = "UNABLE_CREATE_ACTION_ERR"
to work.
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.
Ok, thank you for your help @markusthoemmes , seems I don't t get the real spirit of of the issue yet.
As we discussed before.. If we agree this is correct, I'll continue the remain ones.