@@ -46,7 +46,7 @@ func SearchDocsArgs(query string, limit int) []string {
|
||||
|
||||
// DocInfoArgs / SheetListArgs 是校验「这篇还能不能读」的只读命令:
|
||||
// 文档取元信息,表格取工作表清单——都真实打一次接口,不用缓存谎报可读。
|
||||
func DocInfoArgs(node string) []string { return []string{"doc", "info", "--node", node} }
|
||||
func DocInfoArgs(node string) []string { return []string{"doc", "info", "--node", node} }
|
||||
func SheetListArgs(node string) []string { return []string{"sheet", "list", "--node", node} }
|
||||
|
||||
// IsSheet 判断节点是否表格:表格要用 sheet 校验,文档用 doc。
|
||||
@@ -190,4 +190,4 @@ func parseDocInfo(raw []byte) (DocumentNode, error) {
|
||||
return DocumentNode{}, errors.New("doc info has no title")
|
||||
}
|
||||
return doc, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,4 +71,4 @@ func TestValidateDocumentRejectsUnreadableNodes(t *testing.T) {
|
||||
if _, err := ValidateDocument(context.Background(), runner, " "); !errors.Is(err, ErrUnavailable) {
|
||||
t.Fatal("an empty node must not validate")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,4 +165,4 @@ func TestValidateSourceSelectionRejectsEmptyAndOversizedSelections(t *testing.T)
|
||||
t.Fatalf("refs=%d status = %d, want 400", len(refs), rec.Code)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user