Error returns an error depending on the type contained in InvalidValueError
()
| 31 | |
| 32 | // Error returns an error depending on the type contained in InvalidValueError |
| 33 | func (s *InvalidValueError) Error() string { |
| 34 | if s.Type == nil { |
| 35 | return "cache: invalid value passed: nil" |
| 36 | } |
| 37 | |
| 38 | if s.Type.Kind() != reflect.Pointer { |
| 39 | return "cache: invalid value passed: non-pointer" |
| 40 | } |
| 41 | |
| 42 | return fmt.Sprintf("cache: invalid value passed: nil %s", s.Type.String()) |
| 43 | } |
| 44 | |
| 45 | // Config contains configuration for our cache. This config should contain any |
| 46 | // cache configuration options we actually use. |