(key []byte)
| 298 | } |
| 299 | |
| 300 | func (m *SyncMap) Get(key []byte) ([]byte, error) { |
| 301 | v, ok := m.c.Load(string(key)) |
| 302 | if !ok { |
| 303 | return nil, errKeyNotFound |
| 304 | } |
| 305 | |
| 306 | tv, ok := v.([]byte) |
| 307 | if !ok { |
| 308 | return nil, errInvalidValue |
| 309 | } |
| 310 | |
| 311 | return tv, nil |
| 312 | } |
| 313 | |
| 314 | func (m *SyncMap) Set(key, value []byte) error { |
| 315 | // We are not performing any initialization here unlike other caches |
nothing calls this directly
no outgoing calls
no test coverage detected