goblueprints icon indicating copy to clipboard operation
goblueprints copied to clipboard

Chapter 3: Map check in client not needed

Open razvan-tache opened this issue 6 years ago • 0 comments

Hi,

In chapter 3, client.go there is a test for the avatar url in the user data map: https://github.com/matryer/goblueprints/blob/master/chapter3/chat/client.go#L35

This should never fail, as it checks if the avatar_url entry is in the map, and it should always be, even if it's nil as per: https://github.com/matryer/goblueprints/blob/master/chapter3/chat/auth.go#L106

Also, if it's a nil, then a panic will happen.

Am I missing something?

razvan-tache avatar Aug 04 '18 17:08 razvan-tache