Replace github.com/unknwon/com with stdlib and internal helpers (#8148)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Joe Chen <jc@unknwon.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Copilot
2026-02-05 22:08:54 -05:00
committed by GitHub
parent 6d56105f8f
commit bf17cc6c69
38 changed files with 259 additions and 171 deletions

View File

@@ -3,11 +3,11 @@ package database
import (
"context"
"fmt"
"strconv"
"strings"
"time"
"github.com/cockroachdb/errors"
"github.com/unknwon/com"
log "unknwon.dev/clog/v2"
"xorm.io/xorm"
@@ -148,7 +148,7 @@ func (c *Comment) APIFormat() *api.Comment {
}
func CommentHashTag(id int64) string {
return "issuecomment-" + com.ToStr(id)
return "issuecomment-" + strconv.FormatInt(id, 10)
}
// HashTag returns unique hash tag for comment.
@@ -158,7 +158,7 @@ func (c *Comment) HashTag() string {
// EventTag returns unique event hash tag for comment.
func (c *Comment) EventTag() string {
return "event-" + com.ToStr(c.ID)
return "event-" + strconv.FormatInt(c.ID, 10)
}
// mailParticipants sends new comment emails to repository watchers