PacktPublishing / Go-Design-Patterns

This is the code repository for the book, Go Design Patterns, published by Packt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prototype example issue.

bus710 opened this issue · comments

Don't know if I missed something from the book (if so, please let me know).

From the prototype example code, the first check fails so that I changed as I understand.

From

func GetShirtsCloner() ShirtCloner {
 return nil
}

To

func GetShirtsCloner() ShirtsCloner {
	return &ShirtsCache{}
}

Would anyone tell me if my thought on the code is right or wrong?

Thanks,