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

应该去掉无效重复的字段HostName #111

Open
akayj opened this issue Nov 17, 2023 · 2 comments
Open

应该去掉无效重复的字段HostName #111

akayj opened this issue Nov 17, 2023 · 2 comments

Comments

@akayj
Copy link

akayj commented Nov 17, 2023

存在两个 hostname, 文档中Hostname 但是在SDK中存在两者。
实测Hostname 有效, 建议ecs.InstanceForDescribeInstancesOutput 去掉 HostName 以防止误用导致 panic 的可能.

type InstanceForDescribeInstancesOutput struct {
	HostName *string `type:"string"`  // 迷惑的无效字段

	Hostname *string `type:"string"`
}
@zpp12354321
Copy link
Collaborator

您好,感谢您的反馈

这是历史兼容问题,之前某些情况下 HostName 也是会返回。为了防止下掉字段后,用户编译直接报错,所以这里做了兼容性保留

建议您根据最新的API接口文档选择字段

@akayj
Copy link
Author

akayj commented Nov 29, 2023

您好,感谢您的反馈

这是历史兼容问题,之前某些情况下 HostName 也是会返回。为了防止下掉字段后,用户编译直接报错,所以这里做了兼容性保留

建议您根据最新的API接口文档选择字段

为什么要新增字段呢?

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

No branches or pull requests

2 participants