aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/allegro/bigcache/entry_not_found_error.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/allegro/bigcache/entry_not_found_error.go')
-rw-r--r--vendor/github.com/allegro/bigcache/entry_not_found_error.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/github.com/allegro/bigcache/entry_not_found_error.go b/vendor/github.com/allegro/bigcache/entry_not_found_error.go
new file mode 100644
index 000000000..883bdc29e
--- /dev/null
+++ b/vendor/github.com/allegro/bigcache/entry_not_found_error.go
@@ -0,0 +1,17 @@
+package bigcache
+
+import "fmt"
+
+// EntryNotFoundError is an error type struct which is returned when entry was not found for provided key
+type EntryNotFoundError struct {
+ key string
+}
+
+func notFound(key string) error {
+ return &EntryNotFoundError{key}
+}
+
+// Error returned when entry does not exist.
+func (e EntryNotFoundError) Error() string {
+ return fmt.Sprintf("Entry %q not found", e.key)
+}