aboutsummaryrefslogtreecommitdiff
path: root/nvdmirror
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-22 21:13:38 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-22 21:13:38 -0500
commitb6f1f0ac8f2d6ca3d20ab254b5bed48543817899 (patch)
treeb203e777481bee5fbc54f036d933a4f6cc78e13a /nvdmirror
parent86240375e87482836f5c5877f091df545895f547 (diff)
downloadcvez-b6f1f0ac8f2d6ca3d20ab254b5bed48543817899.tar.bz2
cvez-b6f1f0ac8f2d6ca3d20ab254b5bed48543817899.zip
nvdmirror/failsetcache: add Delete()
Diffstat (limited to 'nvdmirror')
-rw-r--r--nvdmirror/failsetcache.go5
-rw-r--r--nvdmirror/failsetcache_test.go7
2 files changed, 12 insertions, 0 deletions
diff --git a/nvdmirror/failsetcache.go b/nvdmirror/failsetcache.go
index ed5679b..b119a10 100644
--- a/nvdmirror/failsetcache.go
+++ b/nvdmirror/failsetcache.go
@@ -17,6 +17,11 @@ func (me FailSetCache) Set(s string, _ map[string]string) error {
return fmt.Errorf("set failed: %s", s)
}
+// Delete value (always succeeds).
+func (me FailSetCache) Delete(_ string) error {
+ return nil
+}
+
// Close cache. Always succeeds
func (me FailSetCache) Close() error {
return nil
diff --git a/nvdmirror/failsetcache_test.go b/nvdmirror/failsetcache_test.go
index 8e20a33..d1b91bf 100644
--- a/nvdmirror/failsetcache_test.go
+++ b/nvdmirror/failsetcache_test.go
@@ -20,6 +20,13 @@ func TestFailSetCache(t *testing.T) {
}
})
+ // test delete
+ t.Run("Delete", func(t *testing.T) {
+ if err := cache.Delete("foo"); err != nil {
+ t.Error(err)
+ }
+ })
+
// test Close
t.Run("Close", func(t *testing.T) {
if err := cache.Close(); err != nil {