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
add version support #34
Conversation
es5/client.js
Outdated
var qualifier = arguments[2]; | ||
|
||
if (qualifier) { | ||
serviceName = `${serviceName}$${qualifier}`; |
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.
is it also recommended in node to use constant instead of string literals like "$"?
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.
es6 支持原生的字符串插入,我觉得比常量加占位符替换的方式更一目了然。比如
`${serviceName}$${qualifier}`;
在 python 中 写成 '{0}${1}'.format(serviceName, qualifier);
在 java 中写成 String.format("%s$%s", serviceName, qualifier);
都比 String interpretation 的方式更加的晦涩些。
有一点不好的地方 String interpretation 的方式没法抽提成字符串常量,从而面向修改不友好,所以我抽提成方法吧。
es5/client.js
Outdated
var qualifier = arguments[4]; | ||
|
||
if (qualifier) { | ||
serviceName = `${serviceName}$${qualifier}`; |
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.
create trigger的时候service name不用带qualifier,qualifier 放在 request的body里
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.
这个代码是生成的,我更新过了以后忘记生成了。
es5/client.js
Outdated
var qualifier = arguments[5]; | ||
|
||
if (qualifier) { | ||
serviceName = `${serviceName}$${qualifier}`; |
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.
create/update trigger的时候service name不用带qualifier,qualifier 放在 request的body里
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.
这个代码是生成的,我更新过了以后忘记生成了。
da9a893
to
8bc3300
Compare
No description provided.