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

add version support #34

Merged
merged 1 commit into from Oct 29, 2018
Merged

add version support #34

merged 1 commit into from Oct 29, 2018

Conversation

vangie
Copy link
Contributor

@vangie vangie commented Oct 28, 2018

No description provided.

@CLAassistant
Copy link

CLAassistant commented Oct 28, 2018

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Oct 28, 2018

Coverage Status

Coverage decreased (-0.5%) to 96.573% when pulling 8bc3300 on vangie/version_alias into 95049a9 on master.

es5/client.js Outdated
var qualifier = arguments[2];

if (qualifier) {
serviceName = `${serviceName}$${qualifier}`;

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 "$"?

Copy link
Contributor Author

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}`;
Copy link
Collaborator

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里

Copy link
Contributor Author

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}`;
Copy link
Collaborator

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里

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个代码是生成的,我更新过了以后忘记生成了。

@rsonghuster rsonghuster merged commit fa39175 into master Oct 29, 2018
CiCi503 pushed a commit that referenced this pull request Oct 28, 2020
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

Successfully merging this pull request may close these issues.

None yet

6 participants