Sfoglia il codice sorgente

Fix lint and MySQL test failures: remove unused function and fix UUID column type

Co-authored-by: unknwon <2946214+unknwon@users.noreply.github.com>
copilot-swe-agent[bot] 2 settimane fa
parent
commit
074714d61f
2 ha cambiato i file con 1 aggiunte e 11 eliminazioni
  1. 1 1
      internal/database/attachment.go
  2. 0 10
      internal/database/issue.go

+ 1 - 1
internal/database/attachment.go

@@ -19,7 +19,7 @@ import (
 // Attachment represent a attachment of issue/comment/release.
 type Attachment struct {
 	ID        int64
-	UUID      string `gorm:"column:uuid;uniqueIndex"`
+	UUID      string `gorm:"column:uuid;type:varchar(191);uniqueIndex"`
 	IssueID   int64  `gorm:"index"`
 	CommentID int64
 	ReleaseID int64 `gorm:"index"`

+ 0 - 10
internal/database/issue.go

@@ -1201,16 +1201,6 @@ const (
 	FilterModeMention   FilterMode = "mentioned"
 )
 
-func parseCountResult(results []map[string][]byte) int64 {
-	if len(results) == 0 {
-		return 0
-	}
-	for _, result := range results[0] {
-		return com.StrTo(string(result)).MustInt64()
-	}
-	return 0
-}
-
 type IssueStatsOptions struct {
 	RepoID      int64
 	UserID      int64