blob: ed5679bb148488e8f35f00e30b9d8263cafb5feb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package nvdmirror
import (
"fmt"
)
// Mock cache implementation that fails on Set().
type FailSetCache byte
// Get cache value. Always returns not found.
func (me FailSetCache) Get(_ string) (map[string]string, bool) {
return nil, false
}
// Set cache value (fails unconditionally).
func (me FailSetCache) Set(s string, _ map[string]string) error {
return fmt.Errorf("set failed: %s", s)
}
// Close cache. Always succeeds
func (me FailSetCache) Close() error {
return nil
}
|