-
Notifications
You must be signed in to change notification settings - Fork 10
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: complete notice module #154
Conversation
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## main #154 +/- ##
========================================
- Coverage 3.25% 3.16% -0.10%
========================================
Files 192 200 +8
Lines 40016 41205 +1189
========================================
+ Hits 1303 1304 +1
- Misses 38646 39834 +1188
Partials 67 67
Flags with carried forward coverage won't be shown. Click here to find out more.
|
分配 @jiuxia211 Review |
internal/common/pack/notice.go
Outdated
db "github.com/west2-online/fzuhelper-server/pkg/db/model" | ||
) | ||
|
||
func BuildNoticeList(notices *[]db.Notice) []*model.NoticeInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥是*[]db.Notice 而不是 []*db.Notice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有什么区别吗()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我之前都是习惯用 []* 的,咱项目也基本都这么用,你这么一问我发现我也不是很清楚原因
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为本身就是引用类型,自带指向底层数组的指针,我认为像我们项目这样将数据层层传递再包装,不涉及切片的扩容,用*[]需要多解引用一次,肯定是浪费
自查 PR 结构
PR 标题符合这个格式: <type>(optional scope): <description>
此 PR 标题的描述以用户为导向,足够清晰,其他人可以理解。
我已经对所有 commit 提供了签名(GPG 密钥签名、SSH 密钥签名)
这个 PR 属于强制变更/破坏性更改
这个 PR 的类型是什么?
这个 PR 做了什么 / 我们为什么需要这个 PR?
(可选)这个 PR 解决了哪个/些 issue?
according to #149
对 Reviewer 预留的一些提醒