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

feat(net/ghttp): remove Req/Res suffix limitation for input/output parameters of strict router handler #3848

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gqcn
Copy link
Member

@gqcn gqcn commented Oct 8, 2024

No description provided.

@houseme
Copy link
Member

houseme commented Oct 8, 2024

什么原因导致要移除呢?不要做一个善变的难人

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


What is the reason for removal? Don't be a fickle 'difficult person'

@oldme-git
Copy link
Member

@gqcn 为啥要移除呢? Difficult person?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@gqcn Why should we remove it? Difficult person?

@gqcn
Copy link
Member Author

gqcn commented Oct 9, 2024

@houseme @oldme-git 我反思,总感觉一个通用的Server组件做这个命名限制没有什么太大必要,大家觉得呢?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@houseme @oldme-git I'm so annoyed. I always feel that it's not necessary for a general Server component to have this naming restriction. What do you think?

@gqcn gqcn added enhancement discuss We need discuss to make decision. labels Oct 9, 2024
@oldme-git
Copy link
Member

@gqcn 还是别改来改去的,大家都用习惯了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@gqcn It’s better not to change it again and again, everyone is used to it.

@houseme
Copy link
Member

houseme commented Oct 9, 2024

@gqcn 还是别改来改去的,大家都用习惯了

老不正经了,善变的娃

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@gqcn It’s better not to change it again and again, everyone is used to it.

You're too old to be serious, you're a fickle kid.

@zcyc
Copy link
Contributor

zcyc commented Oct 16, 2024

支持。应该去掉没有必要的限制。有这个习惯的用户可以继续这样命名。
@gqcn

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


support. Unnecessary restrictions should be removed. Users who have this habit can continue to name them this way.
@gqcn

@zcyc
Copy link
Contributor

zcyc commented Oct 16, 2024

gen service 必须以 s 开头是不是也可以去掉。
@gqcn

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


gen service must start with s. Can it be removed?

@gqcn
Copy link
Member Author

gqcn commented Oct 16, 2024

gen service 必须以 s 开头是不是也可以去掉。 @gqcn

s开头的service struct设计是因为要区分那些struct需要导出为service

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


gen service must start with s. Can it be removed? @gqcn

The service struct starting with s is designed to distinguish those struct that need to be exported as service.

@zcyc
Copy link
Contributor

zcyc commented Oct 17, 2024

gen service 必须以 s 开头是不是也可以去掉。 @gqcn

s开头的service struct设计是因为要区分那些struct需要导出为service

可否采用 AST 方案,获取接收器。可能有些接收器不需要导出,这里还要再想想。
现在这个限制,每次做到 s 开头的功能都不知道怎么优雅取名,比如:ssh。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


gen service must start with s. Can it be removed? @gqcn

The service struct starting with s is designed to distinguish those struct that need to be exported as service.

Is it possible to use AST scheme to obtain the receiver struct.
Now with this limitation, every time I try to implement a function that starts with s, I don’t know how to name it elegantly, such as: ssh.

@houseme
Copy link
Member

houseme commented Oct 17, 2024

gen service 必须以 s 开头是不是也可以去掉。 @gqcn

s开头的service struct设计是因为要区分那些struct需要导出为service

可否采用 AST 方案,获取接收器。可能有些接收器不需要导出,这里还要再想想。 现在这个限制,每次做到 s 开头的功能都不知道怎么优雅取名,比如:ssh。

ssh 这个毕竟还是少量或特殊状态

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


gen service must start with s. Can it be removed? @gqcn

The service struct starting with s is designed to distinguish those struct that need to be exported as service.

Is it possible to use AST scheme to obtain the receiver. There may be some receivers that do not need to be exported, so we need to think about it again. Now with this limitation, every time I try to implement a function that starts with s, I don’t know how to name it elegantly, such as: ssh.

After all, ssh is still a small amount or a special state.

@zcyc
Copy link
Contributor

zcyc commented Oct 17, 2024

gen service 必须以 s 开头是不是也可以去掉。 @gqcn

s开头的service struct设计是因为要区分那些struct需要导出为service

可否采用 AST 方案,获取接收器。可能有些接收器不需要导出,这里还要再想想。 现在这个限制,每次做到 s 开头的功能都不知道怎么优雅取名,比如:ssh。

ssh 这个毕竟还是少量或特殊状态

ssh 当然特殊,我举例子肯定举最能说明问题的例子,其他以 s 开头的单词很多。
school,screen,sale,类似的单词按这个规则都不优雅 sSchool,sScreen,sSale。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


gen service must start with s. Can it be removed? @gqcn

The service struct starting with s is designed to distinguish those structs that need to be exported as service.

Is it possible to use AST scheme to obtain the receiver. There may be some receivers that do not need to be exported, so we need to think about it again. Now with this limitation, every time I try to implement a function that starts with s, I don’t know how to name it elegantly, such as: ssh.

ssh is still a small amount or a special state after all.

Of course, ssh is special. When I give an example, I will definitely give the one that best illustrates the problem. There are many other words starting with s.
School, screen, sale, similar words are not elegant according to this rule: sSchool, sScreen, sSale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss We need discuss to make decision. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants