mirror of
https://github.com/gogs/gogs.git
synced 2026-05-06 15:55:43 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user