From a8493ef2e8037dad05692be800b8c036600c9727 Mon Sep 17 00:00:00 2001 From: Lasse Martin Jakobsen Date: Mon, 5 Aug 2019 10:41:05 +0200 Subject: [PATCH] changed made based on issue 28 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d45da89..8e941ed 100644 --- a/README.md +++ b/README.md @@ -296,7 +296,8 @@ Once we're done with our first attempt at refactoring the function, we can proce ```go func GetItem(extension string) (Item, error) { - if ref, ok := getReference(extension) { + ref, ok := getReference(extension) + if !ok { return EmptyItem, ErrReferenceNotFound } return getItemByReference(ref) @@ -748,7 +749,7 @@ type ErrorDetails interface { type errDetails struct { errtype error - details string + details interface{} } func NewErrorDetails(err error, details ...interface{}) ErrorDetails {