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

key_base.go 319 B

123456789101112131415161718
  1. package redis_key
  2. import "strings"
  3. const KEY_SEPARATE = ":"
  4. const EMPTY_REDIS_VAL = "Nil"
  5. func KeyJoin(keys ...string) string {
  6. var build strings.Builder
  7. for _, v := range keys {
  8. build.WriteString(v)
  9. build.WriteString(KEY_SEPARATE)
  10. }
  11. s := build.String()
  12. s = strings.TrimSuffix(s, KEY_SEPARATE)
  13. return s
  14. }