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

v3: imcompatable changes/incompatibility modification record #4173

Open
gqcn opened this issue Feb 28, 2025 · 2 comments
Open

v3: imcompatable changes/incompatibility modification record #4173

gqcn opened this issue Feb 28, 2025 · 2 comments
Labels
feature planned This issue/proposal is planned into our next steps.

Comments

@gqcn
Copy link
Member

gqcn commented Feb 28, 2025

Is your feature request related to a problem?

Option No

Describe the solution you'd like

这里记录一些非兼容性但确实值得改进的修改,便于未来评估是否值得作为大版本发布。

Describe alternatives you've considered

1. ORM操作强制增加ctx参数

目前ORMModel操作并不强制需要ctx参数,虽然可以通过dao代码生成工具规范使用Ctx(ctx)方法创建Model对象,但这样不是很优雅。

同时ORM组件内部处理ctx性能不是很高效,ctx参数作为DB实现对象的属性保存了起来,如果作为方法参数传递,这样别扭的设计可以去掉,也可以简化逻辑处理。

2. http server slice参数传递方式与标准库统一

http serverslice参数传递参考的是PHP的习惯,通过k[]的方式传递,这块需要参考golang标准库实现,以便于更统一的Golang处理逻辑。

3. gtime.Format和标准库的time.Format不一致

目前gtime.Format参考的是PHP的时间格式化方式,但该方法与标准库的time.Format冲突,建议改名。

Additional

No response

@gqcn gqcn added the feature label Feb 28, 2025
@Issues-translate-bot Issues-translate-bot changed the title v3: imcompatable changes/非兼容性修改记录 v3: imcompatable changes/incompatibility modification record Feb 28, 2025
@gqcn gqcn added the planned This issue/proposal is planned into our next steps. label Feb 28, 2025
@cyjaysong
Copy link
Contributor

  1. gtime.Format和标准库的time.Format不一致 可将gtime.Format 和 gtime.Layout对调

@Issues-translate-bot
Copy link

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


  1. The time.Format of gtime.Format and the standard library are inconsistent. You can switch gtime.Format and gtime.Layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature planned This issue/proposal is planned into our next steps.
Projects
None yet
Development

No branches or pull requests

3 participants