Conversation
🚨 PR Title Needs FormattingThe title of this PR needs to be formatted correctly.
|
- 添加了群组服务的完整CRUD功能,包括获取、修改、退出等操作 - 实现了分页查询功能,新增paginate工具包和相关接口 - 添加了群组筛选功能,支持平台、关键字、活跃度等多维度筛选 - 实现了IM连接相关的保护中间件和认证功能 - 优化了API路由结构,增加备份和封禁管理的相关接口 - 添加了批量群组操作功能,支持批量退出和批量通知 - 新增了pprof性能分析配置和相关调试功能
- 添加了群组服务的完整CRUD功能,包括获取、修改、退出等操作 - 实现了分页查询功能,新增paginate工具包和相关接口 - 添加了群组筛选功能,支持平台、关键字、活跃度等多维度筛选 - 实现了IM连接相关的保护中间件和认证功能 - 优化了API路由结构,增加备份和封禁管理的相关接口 - 添加了批量群组操作功能,支持批量退出和批量通知 - 新增了pprof性能分析配置和相关调试功能
# Conflicts: # go.sum
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci-lint
🚫 [golangci-lint] reported by reviewdog 🐶
for loop can be changed to use an integer range (Go 1.22+) (intrange)
🚫 [golangci-lint] reported by reviewdog 🐶
for loop can be changed to use an integer range (Go 1.22+)
🚫 [golangci-lint] reported by reviewdog 🐶
return both a nil error and an invalid value: use a sentinel error instead (nilnil)
sealdice-core/api/v2/ban/service.go
Line 130 in ac3444a
🚫 [golangci-lint] reported by reviewdog 🐶
param cap has same name as predeclared identifier (predeclared)
🚫 [golangci-lint] reported by reviewdog 🐶
QF1001: could apply De Morgan's law (staticcheck)
sealdice-core/utils/paginate/paginate.go
Line 156 in ac3444a
🚫 [golangci-lint] reported by reviewdog 🐶
package should be dynamicform_test instead of dynamicform (testpackage)
🚫 [golangci-lint] reported by reviewdog 🐶
package should be slicep_test instead of slicep (testpackage)
| // http.ListenAndServe("0.0.0.0:8899", nil) | ||
| // }() | ||
| go func() { | ||
| http.ListenAndServe("0.0.0.0:8899", nil) |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
Error return value of http.ListenAndServe is not checked (errcheck)
| apier := humaecho.New(e, huma.DefaultConfig("Sealdiciapi", "1.0.0")) | ||
| v2.InitV2Router(apier, _myDice) | ||
| res := e.Routes() | ||
| fmt.Println(res) |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
use of fmt.Println forbidden by pattern ^(fmt\.Print(|f|ln)|print|println)$ (forbidigo)
| } | ||
|
|
||
| // 私以为这应该是个WebSocket接口 准备使用Melody进行改造 先不放在这里 | ||
| //func (s *BaseService) GetDiceLogItems(_ context.Context, req *request.RequestWrapper[]) (*response.ItemResponse[bool], error) { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
commentFormatting: put a space between // and comment text (gocritic)
| GetTotal() (int64, error) | ||
| // GetListRows 获取每页数量 | ||
| GetListRows() int64 | ||
| //GetLastPage 获取最后一页页码 |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
commentFormatting: put a space between // and comment text (gocritic)
| GetListRows() int64 | ||
| //GetLastPage 获取最后一页页码 | ||
| GetLastPage() (int64, error) | ||
| //HasPages 数据是否足够分页 |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
commentFormatting: put a space between // and comment text (gocritic)
| want int64 | ||
| wantErr bool | ||
| } | ||
| for _, tt := range tests { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)
| args args | ||
| wantErr bool | ||
| } | ||
| for _, tt := range tests { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)
| args args | ||
| want bool | ||
| } | ||
| for _, tt := range tests { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)
| args args | ||
| want bool | ||
| } | ||
| for _, tt := range tests { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)
| args args | ||
| wantErr bool | ||
| } | ||
| for _, tt := range tests { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)
| } | ||
| if len(ks) > 1 { | ||
| // 简单稳定排序 | ||
| for i := 0; i < len(ks)-1; i++ { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
for loop can be changed to use an integer range (Go 1.22+) (intrange)
| } | ||
| vs := va.Slice(int(offset), int(needSize)) | ||
| vt := reflect.ValueOf(dest).Elem() | ||
| for i := 0; i < vs.Len(); i++ { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
for loop can be changed to use an integer range (Go 1.22+)
| if err != nil { | ||
| return nil, huma.Error500InternalServerError("删除失败", err) | ||
| } | ||
| return nil, nil |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
return both a nil error and an invalid value: use a sentinel error instead (nilnil)
| v := reflect.Indirect(reflect.ValueOf(data)) | ||
| return v.Kind() == reflect.Slice | ||
| } | ||
| func makeSlice(data interface{}, length, cap int) error { |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
param cap has same name as predeclared identifier (predeclared)
|
|
||
| // HasPages 数据是否足够分页 | ||
| func (p *Paginate) HasPages() bool { | ||
| return !(p.currentPage == 1 && !p.hasMore) |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
QF1001: could apply De Morgan's law (staticcheck)
| @@ -0,0 +1,239 @@ | |||
| package dynamicform | |||
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
package should be dynamicform_test instead of dynamicform (testpackage)
| @@ -0,0 +1,136 @@ | |||
| package slicep | |||
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
package should be slicep_test instead of slicep (testpackage)
No description provided.