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

查询需求 ID 的类型不应该为 Multi[int] #58

Closed
reitowo opened this issue Mar 12, 2025 · 7 comments
Closed

查询需求 ID 的类型不应该为 Multi[int] #58

reitowo opened this issue Mar 12, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@reitowo
Copy link

reitowo commented Mar 12, 2025

ID *Multi[int] `url:"id,omitempty"` // ID 支持多ID查询,多个ID用逗号分隔

应该是 int64

Copy link

dosubot bot commented Mar 12, 2025

Hey there, @reitowo! I'm here to help you with bug fixes, questions, and becoming a contributor. Let's squash those bugs together! 😊

The Multi[int] type is used in the api_story.go file to support querying with multiple IDs, where multiple IDs can be separated by commas [1]. If the requirement ID should be a single int64 instead of Multi[int], it would mean that the functionality is intended to handle only a single ID at a time, rather than multiple IDs. This change would affect how the API requests are constructed and processed, potentially limiting the ability to query multiple resources in a single request.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@flc1125
Copy link
Member

flc1125 commented Mar 12, 2025

我还在旅游,晚些时候我看看。

@dosubot dosubot bot added the bug Something isn't working label Mar 12, 2025
@reitowo
Copy link
Author

reitowo commented Mar 12, 2025

好的

@flc1125
Copy link
Member

flc1125 commented Mar 15, 2025

我想了解是出于什么原因或场景,认为它应该是int64?

能否提供一个案例或者官方的一些介绍或说明。


作为补充的说明:官方的 API 设计也是非常令人苦恼。在有些时候,ID 类请求多数为int(or int64),但返回的时候,值却是 string。以至于在应用层的时候,需要花一些精力去处理数据类型的转换问题。

@reitowo
Copy link
Author

reitowo commented Mar 15, 2025

需求的ID都很长,go的int装不下

@flc1125
Copy link
Member

flc1125 commented Mar 15, 2025

OK,我将在下个版本修复此问题。

@flc1125 flc1125 closed this as completed Mar 15, 2025
@flc1125
Copy link
Member

flc1125 commented Mar 15, 2025

Closed due to #64 reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants