Go: fix warnings (#17738)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-08-03 21:30:01 +08:00
committed by GitHub
parent d357eea8ef
commit 86021932ae
103 changed files with 437 additions and 439 deletions

View File

@@ -263,7 +263,7 @@ func (h *DocumentHandler) GetDocumentPreview(c *gin.Context) {
ctx := c.Request.Context()
preview, err := h.documentService.GetDocumentPreview(ctx, docID)
if err != nil {
common.ErrorWithCode(c, common.CodeDataError, "Document not found!")
common.ErrorWithCode(c, common.CodeDataError, "document not found")
return
}
@@ -636,7 +636,7 @@ func parseDocumentListOptions(c *gin.Context, datasetID string) (dao.DocumentLis
docID := c.Query("id")
docIDs := queryValues(c, "ids")
if docID != "" && len(docIDs) > 0 {
return opts, fmt.Sprintf("Should not provide both 'id':%s and 'ids'%v", docID, docIDs)
return opts, fmt.Sprintf("should not provide both 'id':%s and 'ids'%v", docID, docIDs)
}
if docID != "" {
opts.DocIDs = []string{docID}