refactor: upgrade to Go 1.26 and modernize code idioms
- Replace `interface{}` with `any` type alias across all packages
- Use built-in `min()`/`max()` for parameter clamping
- Use `slices.SortFunc`, `slices.Min`, `slices.Max` for cleaner code
- Use `strings.Cut()` for simpler string parsing in auth middleware
- Use `errors.Is()` for proper error comparison in handlers
- Update dependencies: golang.org/x/image 0.37.0 -> 0.38.0
- Add Wire code generation guidelines to ARCHITECTURE.md
- Disable Go cache in CI build workflow
This commit is contained in:
@@ -236,13 +236,13 @@ func (h *RunnerHub) GetAvailableRunner(taskType runner.TaskType) (*RunnerConnect
|
||||
}
|
||||
|
||||
// GetAllRunners 获取所有已连接的 Runner 信息
|
||||
func (h *RunnerHub) GetAllRunners() []map[string]interface{} {
|
||||
func (h *RunnerHub) GetAllRunners() []map[string]any {
|
||||
h.mu.RLock()
|
||||
defer h.mu.RUnlock()
|
||||
|
||||
result := make([]map[string]interface{}, 0, len(h.runners))
|
||||
result := make([]map[string]any, 0, len(h.runners))
|
||||
for id, conn := range h.runners {
|
||||
result = append(result, map[string]interface{}{
|
||||
result = append(result, map[string]any{
|
||||
"id": id,
|
||||
"version": conn.Version,
|
||||
"capabilities": conn.Capabilities,
|
||||
|
||||
Reference in New Issue
Block a user