You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
469 B

2 months ago
package misc
import (
"fmt"
globalMisc "github.com/TremblingV5/DouTok/pkg/misc"
)
func EnsureIdLength(id int64) string {
return globalMisc.LFill(fmt.Sprint(id), 20)
}
func GetCommentRowKey(video_id int64, is_deleted string, conversation_id int64, timestamp string) string {
return EnsureIdLength(video_id) + is_deleted + EnsureIdLength(conversation_id) + timestamp
}
func GetCommentQueryPrefix(video_id int64) string {
return EnsureIdLength(video_id) + "0"
}