From 51993ace80ce435271ceac11fa97697e36e4b5f1 Mon Sep 17 00:00:00 2001 From: vaibhav malave Date: Sun, 12 Jul 2020 22:48:20 +0530 Subject: [PATCH] Added fix for prototype design pattern. It was not working as GetShortCloner() is returing nil. --- Chapter02/prototype.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter02/prototype.go b/Chapter02/prototype.go index e65a92e..ce25740 100644 --- a/Chapter02/prototype.go +++ b/Chapter02/prototype.go @@ -16,7 +16,7 @@ const ( ) func GetShirtsCloner() ShirtCloner { - return nil + return new(ShirtsCache) } type ShirtsCache struct{}