15 lines
243 B
Go
15 lines
243 B
Go
package redis
|
|
|
|
import "strings"
|
|
|
|
const ServicePrefix = "ai_chat_service_"
|
|
|
|
func GetKey(key string, parts ...string) string {
|
|
key = ServicePrefix + key
|
|
if len(parts) == 0 {
|
|
return key
|
|
}
|
|
key += "_" + strings.Join(parts, "_")
|
|
return key
|
|
}
|