Skip to content

feat: V2接口的脚手架#1452

Draft
PaienNate wants to merge 8 commits intosealdice:masterfrom
PaienNate:feat/newui
Draft

feat: V2接口的脚手架#1452
PaienNate wants to merge 8 commits intosealdice:masterfrom
PaienNate:feat/newui

Conversation

@PaienNate
Copy link
Contributor

No description provided.

@github-actions
Copy link

🚨 PR Title Needs Formatting

The title of this PR needs to be formatted correctly.
Please update the title to match the format type: description. Examples:

  • `fix: fix typo in README.md
  • chore: update dependencies
  • feat: add new feature
  • chore: fixing build pipeline
  • etc.
    More information can be found here.

@PaienNate PaienNate changed the title draft: V2接口的脚手架 feat: V2接口的脚手架 Sep 26, 2025
- 添加了群组服务的完整CRUD功能,包括获取、修改、退出等操作
- 实现了分页查询功能,新增paginate工具包和相关接口
- 添加了群组筛选功能,支持平台、关键字、活跃度等多维度筛选
- 实现了IM连接相关的保护中间件和认证功能
- 优化了API路由结构,增加备份和封禁管理的相关接口
- 添加了批量群组操作功能,支持批量退出和批量通知
- 新增了pprof性能分析配置和相关调试功能
- 添加了群组服务的完整CRUD功能,包括获取、修改、退出等操作
- 实现了分页查询功能,新增paginate工具包和相关接口
- 添加了群组筛选功能,支持平台、关键字、活跃度等多维度筛选
- 实现了IM连接相关的保护中间件和认证功能
- 优化了API路由结构,增加备份和封禁管理的相关接口
- 添加了批量群组操作功能,支持批量退出和批量通知
- 新增了pprof性能分析配置和相关调试功能
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

for i := 0; i < len(ks)-1; i++ {


🚫 [golangci-lint] reported by reviewdog 🐶
for loop can be changed to use an integer range (Go 1.22+)

for i := 0; i < vs.Len(); i++ {


🚫 [golangci-lint] reported by reviewdog 🐶
return both a nil error and an invalid value: use a sentinel error instead (nilnil)

return nil, nil


🚫 [golangci-lint] reported by reviewdog 🐶
param cap has same name as predeclared identifier (predeclared)

func makeSlice(data interface{}, length, cap int) error {


🚫 [golangci-lint] reported by reviewdog 🐶
QF1001: could apply De Morgan's law (staticcheck)

return !(p.currentPage == 1 && !p.hasMore)


🚫 [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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
commentFormatting: put a space between // and comment text (gocritic)

GetTotal() (int64, error)
// GetListRows 获取每页数量
GetListRows() int64
//GetLastPage 获取最后一页页码

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
commentFormatting: put a space between // and comment text (gocritic)

GetListRows() int64
//GetLastPage 获取最后一页页码
GetLastPage() (int64, error)
//HasPages 数据是否足够分页

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
commentFormatting: put a space between // and comment text (gocritic)

want int64
wantErr bool
}
for _, tt := range tests {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)

args args
wantErr bool
}
for _, tt := range tests {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)

args args
want bool
}
for _, tt := range tests {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)

args args
want bool
}
for _, tt := range tests {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)

args args
wantErr bool
}
for _, tt := range tests {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
nilness: range of nil slice (govet)

}
if len(ks) > 1 {
// 简单稳定排序
for i := 0; i < len(ks)-1; i++ {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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++ {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
QF1001: could apply De Morgan's law (staticcheck)

@@ -0,0 +1,239 @@
package dynamicform

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
package should be dynamicform_test instead of dynamicform (testpackage)

@@ -0,0 +1,136 @@
package slicep

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
package should be slicep_test instead of slicep (testpackage)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants