代码质量优化

This commit is contained in:
ryan
2026-06-09 12:16:30 +08:00
parent f428839602
commit 4ac9857fe8
30 changed files with 199 additions and 149 deletions
+2 -2
View File
@@ -136,11 +136,11 @@ func TestListTemplates(t *testing.T) {
}
var resp util.ResponseAny
json.Unmarshal(w.Body.Bytes(), &resp)
_ = json.Unmarshal(w.Body.Bytes(), &resp)
dataBytes, _ := json.Marshal(resp.Data)
var templates []model.Template
json.Unmarshal(dataBytes, &templates)
_ = json.Unmarshal(dataBytes, &templates)
if len(templates) != 2 {
t.Errorf("expected 2 templates, got %d", len(templates))