优化部分存在的问题

This commit is contained in:
Yun
2026-05-27 10:56:37 +08:00
parent fa359b2b1a
commit 448116dc0d
11 changed files with 109 additions and 90 deletions
+4 -1
View File
@@ -182,7 +182,10 @@ func (p *Priority) setPriority() (string, error) {
// 解析结果
if resultMap, ok := result.([]interface{}); ok && len(resultMap) == 1 {
resultStr := resultMap[0].(string)
resultStr, ok := resultMap[0].(string)
if !ok {
return "", fmt.Errorf("script unexpected result type: %T", resultMap[0])
}
return resultStr, nil
}