(s string)
| 192 | return nil |
| 193 | } |
| 194 | func (r *redisCache) encodeString(s string) []byte { |
| 195 | n := uint32(len(s)) |
| 196 | |
| 197 | b := make([]byte, 0, n+4) |
| 198 | b = append(b, byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) |
| 199 | b = append(b, s...) |
| 200 | return b |
| 201 | } |
| 202 | |
| 203 | func (r *redisCache) decodeString(bytes []byte) (string, int, error) { |
| 204 | if len(bytes) < 4 { |
no outgoing calls