-
Notifications
You must be signed in to change notification settings - Fork 283
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
Several fixes for XenServer SDK for Go #5687
Several fixes for XenServer SDK for Go #5687
Conversation
Signed-off-by: Ming Lu <ming.lu@cloud.com>
Signed-off-by: Ming Lu <ming.lu@cloud.com>
Signed-off-by: Ming Lu <ming.lu@cloud.com>
Prior to this change, the function parameter list is generated by Mustache template. As a result, a template boolean variable 'first' has to be used to determine if a leading comma is presented or not. E.g. when the 'first' is true, a parameter would be rendered as "a string', and then the next parameter with the 'first' being false would be rendered as ", b string". Putting them together would result in "a string, b string". This could work but is difficult to be understood. In this commit, it is changed to construct the whole function parameter list as a string in OCaml code and bind it to the template variable 'func_params'. Similar changes apply to the template variable 'is_session_id'. It is removed in this commit and the expected values are generated by OCaml code. Signed-off-by: Ming Lu <ming.lu@cloud.com>
Signed-off-by: Ming Lu <ming.lu@cloud.com>
f38387d
to
deb15d6
Compare
@@ -8,10 +8,10 @@ | |||
{{#errors}} |
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 don't see a licence placeholder in this file or SessionMethod.mustache, was it forgotten?
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.
The license placeholder is added in FileHeader.mustache. This header is for all generated .go files except jsonrpc_client.go
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 checked all generated .go files, all contained the license in file header.
Based on the comments in #5679, following changes are in this series: